COMM ( 1 ) USER COMMANDSCOMM ( 1 )


NAME

comm - select or reject lines common to two files

SYNOPSIS

comm [ options ] file1 file2

DESCRIPTION

comm reads two files file1 and file2 which should be ordered in the collating sequence of the current locale, and produces three text columns as output:
1
Lines only in file1.
2
Lines only in file2.
3
Lines in both files.

If lines in either file are not ordered according to the collating sequence of the current locale, the results are not specified.

If either file1 or file2 is -, comm uses standard input starting at the current location.

OPTIONS

-1
Suppress the output column of lines unique to file1.
-2
Suppress the output column of lines unique to file2.
-3
Suppress the output column of lines duplicate in file1 and file2.

EXIT STATUS

0
Both files processed successfully.
>0

An error occurred.

SEE ALSO

cmp(1), diff(1)

IMPLEMENTATION

version

comm (AT&T Research) 1999-04-28
author

Glenn Fowler <glenn.s.fowler@gmail.com>
author

David Korn <dgkorn@gmail.com>
copyright

Copyright © 1992-2012 AT&T Intellectual Property
license

http://www.eclipse.org/org/documents/epl-v10.html