comm
FilesAdvanced In simulator In real LinuxCompare two sorted files column by column
Name: comm = common
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
comm compares two **sorted** files and prints three columns: lines only in file 1, lines only in file 2, and lines in both. Hiding columns with -1, -2 and -3 gives set differences or the intersection.
Syntax
comm [OPTION]... FILE1 FILE2Common options
| -1 | Suppress lines unique to FILE1 |
| -2 | Suppress lines unique to FILE2 |
| -3 | Suppress lines in both files |
| --check-order | Check that the input is sorted (unsorted input gives wrong results) |
| --output-delimiter STR | Separate the columns with STR (a tab by default) |