Link to home
Start Free TrialLog in
Avatar of su-n
su-nFlag for Germany

asked on

How to use GREP to get the results I want?

Hi,

I have to search for an expression in several log's, but the way I can use grep, the resulting file too large (few 10's of thousands of rows). Therefor there should be an exclude expression to shorten the result.

What I've done:

grep searchterm /path/* > 01

and I do get a file of 40MB.

In file 01 are terms/expression I want to exclude in the result.

How do I use grep to get all rows with "searchterm", but without "192.168.0.1" and "192.168.0.2"?


Thanks,
Sven

SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of su-n

ASKER

Thanks alot for your help!