I have the need to check content of very many files for a block of text.
I know the data should match for instance/as an example the following
The list of characters
bugs bunny
tom and jerry
Mighty mouse
Felix the cat
/
In the first step, I isolated the interesting data by using sed to print everything between "The list of characters" and the "/"
Now I want to match the entire block by using whats shown above to ensure that the isolated block matches exactly line by line.
If the test block shown above, doesn't match the file containing the isolated and interesting data set a flag to no.
If the test block shown above does match the file containing the isolated and interesting data, set a flag to yes.
I would prefer to do this with sed, awk or ksh. The linux box Im working on has limited perl modules loaded.
The only thing I can think of at this point is loop through the files, then grep each file for every line using the known good data set. That will tell me if a particular lines exists, but wont tell me if the entire block is matched exactly.