Command-line Knowledge Base
comm
Usage
- Compare FILE1 and FILE2 line by line.
- Column one contains lines unique to FILE1.
- Column two contains lines unique to FILE2.
- Column three contains lines common to both files.
-1 |
suppress column 1 (lines unique to FILE1) |
-2 |
suppress column 2 (lines unique to FILE2) |
-3 |
suppress column 3 (lines that appear in both files) |
Example
comm [-1] [-2] [-3 ] file1 file2