Compares sorted files
comm [options] file1 file2
The comm utility displays a line-by-line comparison of two sorted files. (If the files have not been sorted, comm will not work properly.) The display is in three columns. The first column lists all the lines found only in file1, the second column lists lines found only in file2, and the third lists those common to both files. Lines in the second column are preceded by one TAB, and those in the third column are preceded by two TABs.
The file1 and file2 are pathnames of the files that comm compares. You can use a hyphen in place of either file1 or file2 (but not both) to cause comm to read standard input.
You can use the options -1, -2, and -3 individually or in combination. ...