Click to See Complete Forum and Search --> : Inverted Grep?


Etherphyte
01-09-2001, 10:30 AM
Hello,
I have a strange one here. Is there a way to invert the method of searching with grep or any other program so i can have it return lines that DON'T contain the search string? I am trying to write a program that searches the logs for connections, but I want to eliminate all of my own connections from work.
Thanks,
Ad

demian
01-09-2001, 10:41 AM
From the output of grep --help:
-v, --invert-match select non-matching lines

Etherphyte
01-09-2001, 10:49 AM
Sorry, right there in the man page. Must have missed it. :P
-ad

mdwatts
01-09-2001, 10:54 AM
But you won't the next time. http://www.linuxnewbie.org/ubb/wink.gif