How can I can insert the contents of a file into another file right before a specific line using sed?
example I have file1.xml that has the following:
Usually I do like this:
script snippet:
sed "\$r ${file2}" ${file1} > tmpfile mv tmpfile ${file2}
sed "\$r ${file2}" ${file1} > tmpfile
mv tmpfile ${file2}