I have two files file1 & file2.
Contents of file1:
Text1
Text2
Text3
Contents of file2:
Sample1
Sample2
Sample3
I would like to replace the word Text1 from file1 with the contents of file2. I already tried the below commands:
sed -i 's/Text1/r file2/g' file1
sed -e 's/Text1/`cat file1`/' < file2
Neither of which worked, what am I missing?