comm man page on OpenIndiana

Man page or keyword search:  
man Server   20441 pages
apropos Keyword Search (all sections)
Output format
OpenIndiana logo
[printable version]

comm(1)				 User Commands			       comm(1)

NAME
       comm - select or reject lines common to two files

SYNOPSIS
   /usr/bin/comm
       /usr/bin/comm [-options] file1 file2

   ksh93
       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  col‐
       umns 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
       The following options are supported:

       -1	    Suppresses the output column of lines unique to file1.

       -2	    Suppresses the output column of lines unique to file2.

       -3	    Suppresses	the output column of lines duplicated in file1
		    and file2.

       --help	    Prints basic help information.

       --man	    Prints built-in manual page in either plain text, HTML  or
       --html	    nroff format.
       --nroff

       --version    Prints version information.

OPERANDS
       The following operands are supported:

       file1	A  path	 name of the first file to be compared. If file1 is −,
		the standard input is used.

       file2	A path name of the second file to be compared. If file2 is  −,
		the standard input is used.

USAGE
       See  largefile(5)  for  the  description	 of  the behavior of comm when
       encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).

EXAMPLES
       Example 1 Printing a list of utilities specified by files

       If file1, file2, and file3 each contain a sorted list of utilities, the
       command

	 example% comm -23 file1 file2 | comm -23 - file3

       prints  a  list	of  utilities  in file1 not specified by either of the
       other files. The entry:

	 example% comm -12 file1 file2 | comm -12 - file3

       prints a list of utilities specified by all three files. And the entry:

	 example% comm -12 file2 file3 | comm -23 -file1

       prints a list of utilities specified by both file2 and file3,  but  not
       specified in file1.

ENVIRONMENT VARIABLES
       See  environ(5) for descriptions of the following environment variables
       that affect the execution of comm: LANG, LC_ALL, LC_COLLATE,  LC_CTYPE,
       LC_MESSAGES, and NLSPATH.

EXIT STATUS
       The following exit values are returned:

       0     All input files were successfully output as specified.

       >0    An error occurred.

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Availability		     │SUNWcs			   │
       ├─────────────────────────────┼─────────────────────────────┤
       │CSI			     │Enabled			   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Interface Stability	     │Committed			   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Standard		     │See standards(5).		   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       cmp(1), diff(1), ksh93(1), sort(1), uniq(1), attributes(5), environ(5),
       largefile(5), standards(5)

SunOS 5.11			  29 Nov 2009			       comm(1)
[top]

List of man pages available for OpenIndiana

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net