I would like to do the inverse of this (exactly same example): Extract rows from file_1 based on matching the first two columns from a file_2
That is, extract all rows from file_1 except those with the first two columns matching the first two columns from file_2.
Answer:
awk 'NR==FNR {get[$1" "$2]++; next} !get[$1" "$2]' f2.txt f1.txt
!($1" "$2 in a)
– steeldriver Jan 22 '19 at 1:46