I have a file containing lines, like this:
some strings here class="batch2010" some more strings here click-here
<about 20-30lines here>
some strings here class="batch2006" some more strings here click-here
<about 20-30lines here>
some strings here class="NA" some more strings here click-here
<about 20-30lines here>
some strings here class="batch2010" some more strings here access-denied
<about 20-30lines here>
I want to print the line that contains:
class="batch2010"
but NOT:
access-denied
in the same line and then print the next 10 lines in the file.
Is there any other way, other than having to write a really long and complex shell script?