Thanks Tim,
It is good to know I am heading in the right direction, but as I said it does not work. The script completes, ut it does NOT print the line.
Then on to the next step, How do I skip the next 2 lines and print the 3rd line from where I "found" the test expression?
Thanks again.
Comment on Re: Re: Finding and extracting lines of text
If its just for you and not for processing, then perl is overdoing it and grep -A3 "line searching for" file.log is much easiere.
Else you have to make a little state machine to handle the cases properly (as in before found, searching for lines between, printing the next info and searching for the next data)