I have two files say xxx.txt and yyy.txt. xxx.txt is with list of patterns within double quotes. Eg.
"this is the line1"
"this is the line2"
The yyy.txt with lot of lines. eg:
"This is a test message which contains rubbish information just to fill the page which is of no use. this is the line1 which is suppose to be grepped and displayed as a output."
My requirement is to search the pattern given in xxx.txt at yyy.txt and display the corresponding line as output.
Eg output: this is the line1 which is suppose to be grepped and displayed as a output.
Now i am getting the line which has the required pattern.
Whenever the pattern is matched, it should display the content from other file.
Eg:
I have three files say xxx.txt, yyy.txt, and zzz.txt
xxx.txt with list of patterns within double quotes. Eg.
"this is the line1"
"this is the line2"
The yyy.txt with lot of lines. eg:
"This is a test message which contains rubbish information just to fill the page which is of no use.
this is the line1 which is suppose to be grepped and displayed as a output."
zzz.txt with the following lines. eg:
"line one found"
"line two found"
My requirement is to search the pattern given in xxx.txt at yyy.txt and if it exists in yyy.txt then display the corresponding line from zzz.txt.