Results 1 to 3 of 3
Hi,
I have a log file, where i am required to identify the line number, where a particular string/line appears in the log file.
And then copy 200 lines above ...
- 11-23-2009 #1Just Joined!
- Join Date
- Jan 2009
- Posts
- 13
Script to identify the line number containing a particular "string"
Hi,
I have a log file, where i am required to identify the line number, where a particular string/line appears in the log file.
And then copy 200 lines above that line number to a new file.
Can someone provide pointers on how to write this script or what command to be used ?
Any help would be highly appreciated.
Thanks in advnace,
- 11-23-2009 #2
- 11-26-2009 #3Just Joined!
- Join Date
- Jan 2007
- Posts
- 15
Look into wc -l, awk and cut.
xwulfgar.


Reply With Quote