Reputation: 93
here is the question: I have two files:
file1:
aaa
bbb
ccc
ddd
file2:
bbb
ddd
HOW TO USE DIFF TO GET THIS OUTPUT (only differences)
aaa
ccc
Upvotes: 0
Views: 127
Reputation: 16974
If what you want is records unique to file1, then :
$ comm -23 <(sort file1) <(sort file2)
aaa
ccc
Upvotes: 1