grep question
Is there a way to do a big grep (find . -type f -exec grep ...) that will find all of the files that do not contain PATTERN?
Is there a way to do a big grep (find . -type f -exec grep ...) that will find all of the files that do not contain PATTERN?
If your pattern is in brackets '[]' you can use the '^' character in front of it.
i.e. grep '^[^a-e]*$' foo.txt will find all lines with single words whose first character is NOT any of a-e.
That's the only thing I could dig up so far. I beliee the find command supports the logical NOT operator '!' If I dig up anything else, I'll let you know.
grep -v foo - this will kill foo from the pattern string
grep -v -l
the -v negates, as Don said, the -l just lists file names.
cygwin grep has a reference to
--exclude=PATTERN