Open Source Research and Development

Free and Open Source R&D Projects, Articles, and Reviews

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'

Leave comment

Your email address will not be published. Required fields are marked with *.