Operating System - HP-UX
1833838 Members
2681 Online
110063 Solutions
New Discussion

Useing grep to find exclusive of

 
SOLVED
Go to solution
Maarten van Maanen
Regular Advisor

Useing grep to find exclusive of

Just like most HPUX-user I use grep a lot to find files or list files containg certain strings.
Just wondering; can I use grep to list or find files which do NOT contain certain strings.
4 REPLIES 4
Stefan Farrelly
Honored Contributor
Solution

Re: Useing grep to find exclusive of


use grep -v
Im from Palmerston North, New Zealand, but somehow ended up in London...
Victor BERRIDGE
Honored Contributor

Re: Useing grep to find exclusive of

grep -v " string "
Vincente Fernandes
Valued Contributor

Re: Useing grep to find exclusive of

Look at man page for grep, it is very informative. The option is "-e", use it with negation while testing.
Maarten van Maanen
Regular Advisor

Re: Useing grep to find exclusive of

Thanks a lot for the response.
I read the man page but overlooked the -v option (obviously).