I have a file File1.txt that contains the following:
abc
def
ghi
I have another file File2.txt that contains the following:
123
456
789
I would like to add the contents of file 1 above 789 to give:
123
456
abc
def
ghi
789
Ultimately using sed or awk. I tried a workaround where I used:
file1="$(cat File1.txt)"
sed -i "/^789/i $file1 " File2.txt
However this does not work as intended. Any help would be much appreciated, thank you for your expertise.