man Pages(1): User Commands
  Искать только в названиях книг
Загрузить это руководство в формате PDF

NAME

comm - select or reject lines common to two sorted files

SYNOPSIS

comm [ -1 | -2 | -3 | -12 | -13 | -23 ] filename1 filename2

AVAILABILITY

SUNWesu

DESCRIPTION

comm reads filename1 and filename2, which should be ordered in ASCII collating sequence (see sort(1)), and produces a three-column output: lines only in filename1; lines only in filename2; and lines in both files. The file name -- means the standard input.

OPTIONS

The following options can be used to suppress the indicated columns from the display.
-1
Suppress column 1; omit lines only in filename1.
-2
Suppress column 2; omit lines only in filename2.
-3
Suppress column 3; omit lines common to both files.
-12
Suppress columns 1 and 2; only show lines common to both files.
-13
Suppress columns 1 and 3; only show lines in filename2.
-23
Suppress columns 2 and 3; only show lines in filename1.

ENVIRONMENT

If any of the LC_ *variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY )(see environ(5)) are not set in the environment, the operational behavior of comm for each corresponding locale category is determined by the value of the LANG environment variable. If LC_ALL is set, its contents are used to override both the LANG and the other LC_ *variables. If none of the above variables is set in the environment, the "C" (U.S. style) locale determines how comm behaves.
LC_CTYPE
Determines how comm handles characters. When LC_CTYPE is set to a valid value, comm can display and handle text and filenames containing valid characters for that locale. comm can display and handle Extended Unix Code (EUC) characters where any individual character can be 1, 2, or 3 bytes wide. comm can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid.
LC_MESSAGES
Determines how diagnostic and informative messages are presented. This includes the language and style of the messages, and the correct form of affirmative and negative responses. In the "C" locale, the messages are presented in the default form found in the program itself (in most cases, U.S. English).

SEE ALSO

cmp(1), diff(1), sort(1), uniq(1), environ(5)

NOTES

You can specify -123 ,but doing so suppresses all output.