66 lines
884 B
Plaintext
66 lines
884 B
Plaintext
|
|
|
|
|
|
|
|
|
|
Command: comm - print lines common to two sorted files
|
|
Syntax: comm [-123] file1 file2
|
|
Flags: -1 Suppress column 1 (lines present only in file1)
|
|
-2 Suppress column 2 (lines present only in file2)
|
|
-3 Suppress column 3 (lines present in both files)
|
|
Examples: comm file1 file2 # Print all three columns
|
|
comm -12 file1 file2 # Print only lines common to both
|
|
files
|
|
|
|
Two sorted files are read and compared. A three column listing is
|
|
produced. Files only in file1 are in column 1; files only in file2 are
|
|
in column 2; files common to both files are in column 3. The file name
|
|
- means stdin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|