Computing.Net > Forums > Unix > grep help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

grep help

Reply to Message Icon

Name: jrmontg
Date: October 23, 2006 at 10:42:24 Pacific
OS: Windows 2000 Server
CPU/Ram: Intel Xeon
Product: HP
Comment:

I have a log file that I need to find some words and exclude others and > report.log

Thanks for the help

jrmontg



Sponsored Link
Ads by Google

Response Number 1
Name: lankrypt0
Date: October 25, 2006 at 10:47:25 Pacific
Reply:

Can you give an example of what you are trying to do? Your description is a bit vague.



0

Response Number 2
Name: Devaraj (by Fidy)
Date: October 27, 2006 at 22:53:22 Pacific
Reply:

if your question is to get only the lines where the word exits then do a

sed -n '/word/p' filename > outfile

Hope this helps..

Regards,
Devaraj Takhellambam


0

Response Number 3
Name: shereenmotor
Date: October 30, 2006 at 03:14:23 Pacific
Reply:

Try:

grep -v "words_to_exclude" infile > outfile

A sample of your input/output file would make it easy to provide you the solution.

Regards,
Tayyab


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Same Inodes for Directori... Code Page Problem



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: grep help

Grep Help www.computing.net/answers/unix/grep-help/5833.html

grep Help www.computing.net/answers/unix/grep-help/6804.html

grep help www.computing.net/answers/unix/grep-help/4368.html