I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C.
Thanks a lot!!
Here is a sample of my question.
e.g. (file A: a.txt; file B: b.txt; file C: c.txt)
a.txt
Hello World
Hello ABC
Hello
Hello
b.txt
Hello ABC
Hello
c.txt
Hi XYZ
XYZ
Test
Here is the expected output:
a.txt
Hello World
Hi XYZ
sed. Actually I am writing a shell script to modify some existing shell script. But I am not able to use sed directly as the string I wanted to replace is too long. So, I want to use two files to be the configuration file.