I do not have any knowledge of scripting. I want to replace specific lines of a text file with a specific text. Like I have one file which is "original file" and one file "changes file" which has list of lines which I want to replace in original file with a specific string. I want the script to go through the original file using changes file line by line and change the text as soon as it finds it with the given text and after first occurrence should move to the next line of the changes file and look for the second line and change it with the same given text. the lines in the changes file are kept sequentially in the same order as the original file so the pointer do not need to go back up. Please help. Thanks in advance.
I want to change the contents of original_file that matches contents of change_file with specific text like x@x.com
After running the query the resulting file should look like following
New_file
a@b.com
x@x.com
E@f.com
g@h.com
x@x.com
k@l.com
I hope this explains my requirement. Thanks alot for all the support.