I have 2 files which contain loads of text.
In both of the files there are lines which begin 'Query:' (these are embedded between other lines of text which I am not interested in). On the same line following the word 'Query:' is the text that I am interested in let's call it 'blurb'.
What I need to do is find every occurrence of blurb which exists in file1 and file2.
I would apreciate any advice on this matter as I am at a loose end, the only solution I can think of is:
Search through file1 for the word Query:, store the text following this in a variable 'blurb', then search through file2 for the variable 'blurb'. Then return to File1 and repeat.