Urgent Help [message #98320] |
Wed, 21 July 2004 02:01 |
pulkit
Messages: 18 Registered: April 2004
|
Junior Member |
|
|
HI,
I have a log file and i want to select all lines from this log file that contain word "Total" in it as a first word of line and then put all the selected lines into a saperate file.
How can i do it?
Please suggest ASAP.
Regards
Pulkit
|
|
|
|
Re: Urgent Help [message #98322 is a reply to message #98320] |
Wed, 21 July 2004 05:24 |
Jai Vrat Singh
Messages: 205 Registered: September 2002 Location: Singapore
|
Senior Member |
|
|
-
This will select all line staring with word total (case insensitive) into a new file called selected.txt. In case you want it to be case sensitive then please remove -i
grep -i "^Total" yourfile.log > selected.txt
-
|
|
|