I have a file f1.txt that contains string:
f1.txt
aaa
bbb
ccc
...
I want to write code to search that each string in file f2.txt(this file contains 1000+line codes).
file f2.txt
..
..
....aaa...xyz..
...
...
...ppp...
(dots . can be characters ot blank spaces)
If particular string 'xyz' appears in same line as the above string searched in f2.txt, i want to search the first occurence of string 'ppp' and mark it(line containing string 'ppp') in file f3.txt.
The string 'ppp' and 'xyz' will remain same for entire code, but strings in file f1.txt will vary.