commΒΆ

Compare two sorted files line by line:

E.g. find lines that are not common:

cat a.txt

1
2
3
cat b.txt

1
2
3
4
comm -3 a.txt b.txt

4

In case the files are not sorted:

comm -3 <(sort a.txt) <(sort b.txt)