comm [-1/2/3] file1 file2

Select/reject lines common to two sorted files.

Output is in 3 columns - 
col 1> lines only in file1
col 2> lines only in file2
col 3> lines in both files

The columns to be output can be specified with the 1/2/3 switch(es).
Flags 1,2,&3 suppress printing of the corresponding column.

Note - files must be sorted.

See also - cmp, diff, uniq.
