Right now this outputs the value I need on stdout. How can I capture it into a variable so I can use it in the rest of the script?
Requirements:
The cat ... | isn't necessary.
cat ... |
foo=$(sed 's/-/_/g' << EOF 1-2 3-4 EOF )