Hi AWK gurus,
I need to write to a file from a log file after the script finds a particular word. The file which I read is a log file.
Let me give an example. The three lines are like this
02 20 2001
There are errors in file.
Test was failure.
We will serach for a word Test and I need to print out all the three lines (ie the line with the word Test and two lines before that. How can I achieve this?
--Sethu
I need to write to a file from a log file after the script finds a particular word. The file which I read is a log file.
Let me give an example. The three lines are like this
02 20 2001
There are errors in file.
Test was failure.
We will serach for a word Test and I need to print out all the three lines (ie the line with the word Test and two lines before that. How can I achieve this?
--Sethu