'\"macro stdmacro
.if n .pH g1.comm @(#)comm	40.3 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} comm 1 "Directory and File Management Utilities" "\&"
.if \nX=1 .ds x} comm 1 "Directory and File Management Utilities"
.if \nX=2 .ds x} comm 1 "" "\&"
.if \nX=3 .ds x} comm "" "" "\&"
.TH \*(x}
.SH NAME
\f4comm\f1 \- select or reject lines common to two sorted files
.SH SYNOPSIS
\f4comm\f1
[
\f4\-\f1
[
\f4123\f1
]
] \f2file1 file2\f1
.SH DESCRIPTION
\f4comm\fP
reads
.I file1\^
and
.IR file2 ,
which
should be ordered in \s-1ASCII\s0 collating sequence [see
\f4sort\fP(1)],
and produces a three-column output: lines only in
.IR file1 ;
lines only in
.IR file2 ;
and lines in both files.
The file name
\f4\-\f1
means the standard input.
.PP
Flags \f41\f1, \f42\f1, or \f43\f1 suppress printing of the corresponding
column.
Thus
\f4comm\f1
\f4\-12\f1
prints only the lines common to the two files;
\f4comm\f1
\f4\-23\f1
prints only lines in the first file but not in the second;
\f4comm\f1
\f4\-123\f1
prints nothing.
.PP
.SH "SEE ALSO"
\f4cmp\fP(1), \f4diff\fP(1), \f4sort\fP(1), \f4uniq\fP(1).
.\"	@(#)comm.1	6.2 of 9/2/83
.Ee
