This question already has an answer here:
I have a set of files that contain some information.
I am interested in the subset of files that do not contain a specific pattern at all.
cat file.txt foo bar trivial information some customer data
let’s say that I am interested in files that do not have the line ‘trivial information’.
How would I do that?
If I do:
grep -v ‘trivial information’
it will not work because the rest of the lines in the file are match to this inverted search so the
file.txt will end up in the result.
So how do I do an invert match on the whole file and not line by line?