So I'm trying to change two instances of a regex pattern to two different strings with sed like:
sed -E "s/\\t([A-Za-z]|[-])+$/\\t`get_addr.py -1`/" /path/to/file.ext sed -E "s/\\t([A-Za-z]|[-])+$/\\t`get_addr.py -2`/" /path/to/file.ext
I've tried a lot of things, and done a solid amount of manpage scouring, but I just can't quite figure out how make it happen.
Is there a way I can tell sed to replace each match with a different string with something like
sed -E "s/\\t([A-Za-z]|[-])+$/[1st replacement],[2nd replacement]/" /path/to/file.ext
and/or is there a way I can specify in the regex that I'm looking for the nth match, so that I can just call sed twice?