I've been fooling with this for a few days, but I'm rather new at this...
I have a bash variable containing a long string of various characters, for instance:
JUNK=this that the other xyz 1234 56 789
I don't know what "xyz" actually is, but I know that:
START=he other
and
STOP=123
In other words, "he other" and "123" are kind of delimiters for whatever "xyz" is.
So, how can I feed sed (or maybe awk?) the variables $JUNK, $START and $STOP to extract "xyz" (and assign it to another variable) without knowing what "xyz" is?