I want to use a here-doc for sed commands and provide the file to be read and the output file.
I've looked at Here-Documents from Advanced Bash Scripting guide but it does not mention anything about regular arguments in using a here-doc. Is it even possible?
I'd like to achieve something like the following:
#!/bin/bash OUT=/tmp/outfile.txt IN=/my_in_file.txt sed $IN << SED_SCRIPT s/a/1/g s/test/full/g SED_SCRIPT > $OUT;
Any help is really appreciated.