In a Bash shell script, I'm processing data that starts off like this:
string1-string2-string3-string4-etc
I need string1 and string2 assigned to unique variables, and string3-string4-etc left together inside of another single unique variable. I played around with trying to set IFS but then string3, string4, and etc were disconnected.
How can I get the data I want? I'd prefer builtin shell commands if possible, but gawk or other tools are fine too.