2005-05-02 15:01:42 +02:00
|
|
|
.TH COMM 1
|
|
|
|
.SH NAME
|
|
|
|
comm \- print lines common to two sorted files
|
|
|
|
.SH SYNOPSIS
|
|
|
|
\fBcomm\fR [\fB\-123\fR] \fIfile1 file2\fR
|
|
|
|
.br
|
|
|
|
.de FL
|
|
|
|
.TP
|
|
|
|
\\fB\\$1\\fR
|
|
|
|
\\$2
|
|
|
|
..
|
|
|
|
.de EX
|
|
|
|
.TP 20
|
|
|
|
\\fB\\$1\\fR
|
|
|
|
# \\$2
|
|
|
|
..
|
|
|
|
.SH OPTIONS
|
2012-03-31 23:44:29 +02:00
|
|
|
.TP 5
|
|
|
|
.B \-1
|
|
|
|
# Suppress column 1 (lines present only in \fIfile1\fP)
|
|
|
|
.TP 5
|
|
|
|
.B \-2
|
|
|
|
# Suppress column 2 (lines present only in \fIfile2\fP)
|
|
|
|
.TP 5
|
|
|
|
.B \-3
|
|
|
|
# Suppress column 3 (lines present in both files)
|
2005-05-02 15:01:42 +02:00
|
|
|
.SH EXAMPLES
|
2012-03-31 23:44:29 +02:00
|
|
|
.TP 20
|
|
|
|
.B comm file1 file2
|
|
|
|
# Print all three columns
|
|
|
|
.TP 20
|
|
|
|
.B comm \-12 file1 file2
|
|
|
|
# Print only lines common to both files
|
2005-05-02 15:01:42 +02:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.PP
|
|
|
|
Two sorted files are read and compared.
|
|
|
|
A three column listing is produced.
|
|
|
|
Files only in
|
|
|
|
.I file1
|
|
|
|
are in column 1;
|
|
|
|
files only in
|
|
|
|
.I file2
|
|
|
|
are in column 2;
|
|
|
|
files common to both files are in column 3.
|
|
|
|
The file name \- means \fIstdin\fR.
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR cmp (1),
|
|
|
|
.BR diff (1),
|
|
|
|
.BR sort (1).
|