Using awk to only print the matching lines in two files

Saturday, December 29, 2012 0 Comments

below is the code:

awk 'FNR==NR{a[$0];next}($0 in a)' file2 file1

for more explanation please see below link:
using-awk-to-delete-lines-from-file

0 comments: