On June 27, 2014 6:43:14 AM EDT, Bernhard Voelker <mail@bernhard-voelker.de> wrote:
On 06/26/2014 06:40 PM, Greg Freemyer wrote:
All,
I know "grep -F -f pattern_file <files-to-search>
will give me a list of all lines with a pattern in them.
I want to know which of the patterns had no matches.
Nice use case - that's fun! ;-)
$ cat patterns hello world badpattern
$ cat file a b chelloc dworldd efhellof g
$ grep -hFo -f patterns file | grep -Fv -f - patterns badpattern
Of course this only works for fixed pattern ... but that seems to be the case for you. ;-)
Have a nice day, Berny
Well done! And yes, for my situation fixed patterns is fine. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org