I am looking to perform an operation with sed that appends to a specific part of a series of files like to:
sed -i "s/test:\n/&$(<test.file)/g" foo.txt
Is there a way I can take the output of a file or some BASH varaible and place it into sed for input into a file.
Should do the trick. Note that the literal newline after the filename is not necessary in all versions of sed, but is advisable. The r command reads the contents of the named file.