awk - Delete lines based on pattern on another file -


i have 2 files

input.txt

hi 1-12t2edd 1-13d62l6hello 1-15sdwakwazzup wow1-18z3qwy 

filter.txt

1-15sdwak 1-1vf3xhv 

i want delete lines matching pattern filter.txt in input.txt. in sql understanding, left outer join input.txt filter.txt

output.txt

hi1-12t2edd 1-13d62l6hello wow1-18z3qwy 

a simple grep this:

$ grep -fvf filter input hi 1-12t2edd 1-13d62l6hello wow1-18z3qwy 

options:

  • -f fixed strings don't need regexp matching
  • -v inverse matching
  • -f specifing file containing strings (inverse) match.

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -