how to grep a list of patterns from a file & ignore the same from another file?

76 Views Asked by At

this is what i'm trying >>

grep 'pattern' FILE1 | grep 'ignore_pattern' from FILE2

I was doing this for individual patterns >> grep 'errmsg' log_file | grep -v '88909'

but i have more than one pattern to ignore, so I have them as a list in a file FILE2.

1

There are 1 best solutions below

0
On
grep pattern file1 | grep -vf file2