BSD 4_2 development
[unix-history] / usr / man / man1 / comm.1
CommitLineData
cb3f4193
C
1.TH COMM 1 "18 January 1983"
2.SH NAME
3comm \- select or reject lines common to two sorted files
4.SH SYNOPSIS
5.B comm
6[
7.B \-
8[
9.B 123
10]
11] file1 file2
12.SH DESCRIPTION
13.I Comm
14reads
15.I file1
16and
17.I file2,
18which should be ordered in ASCII collating sequence,
19and produces a three column output: lines only in
20.I file1;
21lines only in
22.I file2;
23and lines in both files.
24The filename `\-' means the standard input.
25.PP
26Flags 1, 2, or 3 suppress printing of the corresponding
27column.
28Thus
29.B comm
30.B \-12
31prints only the lines common to the two files;
32.B comm
33.B \-23
34prints only lines in the first file but not in the second;
35.B comm
36.B \-123
37is a no-op.
38.PP
39.SH "SEE ALSO"
40cmp(1), diff(1), uniq(1)