1COMM(1) User Commands COMM(1)
2
3
4
6 comm - compare two sorted files line by line
7
9 comm [OPTION]... FILE1 FILE2
10
12 Compare sorted files FILE1 and FILE2 line by line.
13
14 When FILE1 or FILE2 (not both) is -, read standard input.
15
16 With no options, produce three-column output. Column one contains
17 lines unique to FILE1, column two contains lines unique to FILE2, and
18 column three contains lines common to both files.
19
20 -1 suppress column 1 (lines unique to FILE1)
21
22 -2 suppress column 2 (lines unique to FILE2)
23
24 -3 suppress column 3 (lines that appear in both files)
25
26 --check-order
27 check that the input is correctly sorted, even if all input
28 lines are pairable
29
30 --nocheck-order
31 do not check that the input is correctly sorted
32
33 --output-delimiter=STR
34 separate columns with STR
35
36 --total
37 output a summary
38
39 -z, --zero-terminated
40 line delimiter is NUL, not newline
41
42 --help display this help and exit
43
44 --version
45 output version information and exit
46
47 Note, comparisons honor the rules specified by 'LC_COLLATE'.
48
50 comm -12 file1 file2
51 Print only lines present in both file1 and file2.
52
53 comm -3 file1 file2
54 Print lines in file1 not in file2, and vice versa.
55
57 Written by Richard M. Stallman and David MacKenzie.
58
60 GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
61 Report any translation bugs to <https://translationproject.org/team/>
62
64 Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU
65 GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
66 This is free software: you are free to change and redistribute it.
67 There is NO WARRANTY, to the extent permitted by law.
68
70 join(1), uniq(1)
71
72 Full documentation <https://www.gnu.org/software/coreutils/comm>
73 or available locally via: info '(coreutils) comm invocation'
74
75
76
77GNU coreutils 9.3 September 2023 COMM(1)