I have two files file1 & file2.Contents of file1:Text1Text2Text3Contents of file2:Sample1 Sample2Sample3I 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' file1sed -e 's/Text1/`cat file1`/' < file2Neither of which worked, what am I missing?
sed to replace a word from a file with the contents of another file?
bash;sed;regular expression