PDA

View Full Version : How to compare two files and output only unique lines?



Fli
11-12-2015, 01:12 AM
This is a nice command which compare two files and print lines that are in file "newfile" and are not in file "oldfile":

awk 'FNR==NR{a[$0]++;next}!a[$0]' oldfile newfile