find and remove blacklisted elements with cat grep

cat

cat $sourcelist | grep -Ev -f "$tmpwhitelist" >> "$tmpblocklist"

 

# > will replace the string or file
# >> will append to the string or file. # The -E argument tells grep the patterns are extended
# regular expressions, to use them as fixed strings, set by the -F
# argument: grep -Fv -f 2.txt 1.txt

 

 

Posted on: Thursday 11 June 2015