Compare lines common to the sorted files
Three-column output is produced: lines unique to
file1, lines unique to
file2, and lines common to both
comm is similar to diff in that both commands
compare two files. But comm can also be used like uniq;
that is, comm selects duplicate or unique lines between
two sorted files, whereas uniq selects duplicate or unique lines
same sorted file.
Read the standard input.
Suppress printing of column 1.
Suppress printing of column 2.
Suppress printing of column 3.
Print only lines in column 3 (lines common to
Print only lines in column 2 (lines unique to
Print only lines in column 1 (lines unique to
Compare two lists of top-ten movies, and display items that appear in both lists:
comm -12 siskel_top10 ebert_top10