1

Read from one file-Replace a pattern in another with the current one

view story
linux-howto

http://www.unix.com – Hi Friends, I have a text file like this Code: cat main.txt I like this website cat website > new_website grep website > hello_website Code: cat replace.txt hello unix apple Now, for each line read in 2.txt, I want the pattern "website" in 1.txt to be replaced with it. Basically, I will be getting wc number of files in 2.txt So, my final output files will be Code: cat main1.txt I like this hello cat hello > new_hello grep hello > hello_hello Code: cat main2.txt I like this unix cat unix > new_unix grep (HowTos)