| comm |
|---|
|
comm [ options ... ] file1 file2 |
|---|
|
| To indicate which lines in the two input files are unique or common. |
|---|
|
| -1 |
|---|
| Do not print column one (lines unique to file1). |
|---|
| -2 |
|---|
| Do not print column two (lines unique to file2). |
|---|
| -3 |
|---|
| Do not print column three (lines common to both files). |
|---|
|
| Read the two files line by line. The input files must be sorted. Produce three columns of output: lines that are only in file1, lines that are only in file2, and lines that are in both files. Either filename can be -, in which case comm reads standard input. |
|---|
|
| The options are not intuitive; it is hard to remember to add an option in order to remove an output column! |
|---|