commcompare sorted files and show differences |
Command |
comm [-123] file1 file2
comm locates identical lines within files sorted in the same
collating sequence and produces three columns; the first contains lines found
only in the first file, the second lines only in the second file and the third
lines which are in both files.
-1suppresses lines that appear only in file1.
-2suppresses lines that appear only in file2.
-3suppresses lines that appear both in file1 and file2.
comm -12
To find lines which are unique to one file or the other use
comm -3. Note that
comm -123 displays nothing.
0Successful completion.
1Failure because of an error opening or reading an input file.
2Failure which generated a usage message, such as naming only one input file.