How can i search for files which contain string A but not string B ?
Pipe the output of grep through grep -v. For example:
grep 'A' file | grep -v 'B'
This entry was posted on Tuesday, January 6th, 2009 at 8:00 am and is filed under grep FAQ. You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.