[BACK]Return to comm.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / comm

Annotation of src/usr.bin/comm/comm.1, Revision 1.15

1.15    ! jmc         1: .\"    $OpenBSD: comm.1,v 1.14 2009/02/08 17:15:09 jmc Exp $
1.1       deraadt     2: .\"    $NetBSD: comm.1,v 1.4 1995/03/26 09:25:50 glass Exp $
                      3: .\"
                      4: .\" Copyright (c) 1989, 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" This code is derived from software contributed to Berkeley by
                      8: .\" the Institute of Electrical and Electronics Engineers, Inc.
                      9: .\"
                     10: .\" Redistribution and use in source and binary forms, with or without
                     11: .\" modification, are permitted provided that the following conditions
                     12: .\" are met:
                     13: .\" 1. Redistributions of source code must retain the above copyright
                     14: .\"    notice, this list of conditions and the following disclaimer.
                     15: .\" 2. Redistributions in binary form must reproduce the above copyright
                     16: .\"    notice, this list of conditions and the following disclaimer in the
                     17: .\"    documentation and/or other materials provided with the distribution.
1.9       millert    18: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    19: .\"    may be used to endorse or promote products derived from this software
                     20: .\"    without specific prior written permission.
                     21: .\"
                     22: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     23: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     24: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     25: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     26: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     27: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     28: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     29: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     30: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     31: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     32: .\" SUCH DAMAGE.
                     33: .\"
                     34: .\"     @(#)comm.1     8.1 (Berkeley) 6/6/93
                     35: .\"
1.15    ! jmc        36: .Dd $Mdocdate: February 8 2009 $
1.6       aaron      37: .Dt COMM 1
1.1       deraadt    38: .Os
                     39: .Sh NAME
                     40: .Nm comm
                     41: .Nd select or reject lines common to two files
                     42: .Sh SYNOPSIS
                     43: .Nm comm
1.4       deraadt    44: .Op Fl 123f
1.1       deraadt    45: .Ar file1 file2
                     46: .Sh DESCRIPTION
                     47: The
1.5       aaron      48: .Nm
1.1       deraadt    49: utility reads
                     50: .Ar file1
                     51: and
                     52: .Ar file2 ,
                     53: which should be
                     54: sorted lexically, and produces three text
                     55: columns as output: lines only in
                     56: .Ar file1 ;
                     57: lines only in
                     58: .Ar file2 ;
                     59: and lines in both files.
                     60: .Pp
1.7       aaron      61: The filename
1.11      jmc        62: .Sq -
1.7       aaron      63: means the standard input.
1.1       deraadt    64: .Pp
1.7       aaron      65: The options are as follows:
1.1       deraadt    66: .Bl -tag -width Ds
                     67: .It Fl 1
                     68: Suppress printing of column 1.
                     69: .It Fl 2
                     70: Suppress printing of column 2.
                     71: .It Fl 3
                     72: Suppress printing of column 3.
1.4       deraadt    73: .It Fl f
                     74: Fold case in line comparisons.
1.1       deraadt    75: .El
                     76: .Pp
                     77: Each column will have a number of tab characters prepended to it
                     78: equal to the number of lower numbered columns that are being printed.
                     79: For example, if column number two is being suppressed, lines printed
                     80: in column number one will not have any tabs preceding them, and lines
                     81: printed in column number three will have one.
                     82: .Pp
1.5       aaron      83: .Nm
1.1       deraadt    84: assumes that the files are lexically sorted; all characters
                     85: participate in line comparisons.
                     86: .\" .Sh ENVIRONMENT
                     87: .\" .Bl -tag -width indent
                     88: .\" .It Ev LANG
                     89: .\" .It Ev LC_ALL
                     90: .\" .It Ev LC_CTYPE
                     91: .\" .It Ev LC_COLLATE
                     92: .\" .It Ev LC_MESSAGES
                     93: .\" .El
1.15    ! jmc        94: .Sh EXIT STATUS
1.11      jmc        95: .Ex -std comm
1.1       deraadt    96: .Sh SEE ALSO
                     97: .Xr cmp 1 ,
                     98: .Xr diff 1 ,
                     99: .Xr sort 1 ,
                    100: .Xr uniq 1
                    101: .Sh STANDARDS
                    102: The
1.5       aaron     103: .Nm
                    104: utility conforms to
1.14      jmc       105: .St -p1003.1-2008 .
1.10      jmc       106: .Pp
                    107: The flag
                    108: .Op Fl f
1.12      jmc       109: is an extension to that specification.
1.8       mickey    110: .Sh HISTORY
                    111: A
                    112: .Nm
                    113: command appeared in
                    114: .At v4 .