|
Quick links About
comm Syntax Examples
Related commands Linux / Unix main page
About comm
Select or reject lines common to two files.
Syntax
comm [-1] [-2] [-3 ] file1 file2
| -1 |
Suppress the output column of lines unique to file1. |
| -2 |
Suppress the output column of lines unique to
file2. |
| -3 |
Suppress the output column of lines duplicated in file1 and file2. |
| file1 |
Name of the first file to compare. |
| file2 |
Name of the second file to compare. |
Examples
comm myfile1.txt myfile2.txt
The above example would compare
the two files myfile1.txt and myfile2.txt.
Related commands
cmp diff
sort uniq
|