comm
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.
Arguments
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.
Options
You can use the options -1, -2, and -3 individually or in combination. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access