Print this page
13507 some man pages need update following 13405
6308 some man pages are obsolete after moving to ksh builtins

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/cut.1.man.txt
          +++ new/usr/src/man/man1/cut.1.man.txt
   1    1  CUT(1)                           User Commands                          CUT(1)
   2    2  
   3      -
   4      -
   5    3  NAME
   6      -       cut - cut out selected fields of each line of a file
        4 +     cut - cut out selected columns or fields of each line of a file
   7    5  
   8    6  SYNOPSIS
   9      -       cut -b list [-n] [file]...
        7 +     cut -b list [-nN] [-r reclen] [file]...
  10    8  
        9 +     cut -c list [-N] [-r reclen] [file]...
  11   10  
  12      -       cut -c list [file]...
       11 +     cut -f list [-s] [-d delim] [-D ldelim] [file]...
  13   12  
  14      -
  15      -       cut -f list [-d delim] [-s] [file]...
  16      -
  17      -
  18   13  DESCRIPTION
  19      -       Use the cut utility to cut out columns from a table or fields from each
  20      -       line of a file; in data base parlance, it implements the projection of
  21      -       a relation. The fields as specified by list can be fixed length, that
  22      -       is, character positions as on a punched card (-c option) or the length
  23      -       can vary from line to line and be marked with a field delimiter
  24      -       character like TAB (-f option). cut can be used as a filter.
       14 +     Use the cut utility to cut out columns from a table or fields from each
       15 +     line of a file.  In database parlance, it implements the projection of a
       16 +     relation.  The fields as specified by list can be fixed length, that is,
       17 +     character positions as on a punched card (-c option) or the length can
       18 +     vary from line to line and be marked with a field delimiter character
       19 +     such as TAB (-f option).  cut can be used as a filter.
  25   20  
       21 +     Either the -b, -c, or -f option must be specified.
  26   22  
  27      -       Either the -b, -c, or -f option must be specified.
       23 +     Use grep(1) to make horizontal cuts (by context) through a file, or
       24 +     paste(1) to put files together column-wise (that is, horizontally).  To
       25 +     reorder columns in a table, use cut and paste(1).
  28   26  
  29      -
  30      -       Use grep(1) to make horizontal ``cuts'' (by context) through a file, or
  31      -       paste(1) to put files together column-wise (that is, horizontally). To
  32      -       reorder columns in a table, use cut and paste.
  33      -
  34   27  OPTIONS
  35      -       The following options are supported:
       28 +     The following options are supported:
  36   29  
  37      -       list
  38      -                    A comma-separated or blank-character-separated list of
  39      -                    integer field numbers (in increasing order), with optional
  40      -                    - to indicate ranges (for instance, 1,4,7; 1-3,8; -5,10
  41      -                    (short for 1-5,10); or 3- (short for third through last
  42      -                    field)).
       30 +     -b list, --bytes=list
       31 +                   The list following -b specifies byte positions (for
       32 +                   instance, -b 1-72 would pass the first 72 bytes of each
       33 +                   line).  When -b and -n are used together, list is adjusted
       34 +                   so that no multi-byte character is split.
  43   35  
       36 +     -c list, --characters=list
       37 +                   The list following -c specifies character positions (for
       38 +                   instance, -c 1-72 would pass the first 72 characters of
       39 +                   each line).
  44   40  
  45      -       -b list
  46      -                    The list following -b specifies byte positions (for
  47      -                    instance, -b1-72 would pass the first 72 bytes of each
  48      -                    line). When -b and -n are used together, list is adjusted
  49      -                    so that no multi-byte character is split.
       41 +     -d delim, --delimiter=delim
       42 +                   The character following -d is the field delimiter (-f
       43 +                   option only); the default is the TAB character.  Space or
       44 +                   other characters with special meaning to the shell must be
       45 +                   quoted.  delim can be a multi-byte character.
  50   46  
       47 +     -f list, --fields=list
       48 +                   The list following -f is a list of fields assumed to be
       49 +                   separated in the file by a delimiter character (see -d);
       50 +                   for instance, -f 1,7 copies the first and seventh field
       51 +                   only.  Lines with no field delimiters will be passed
       52 +                   through intact (useful for table subheadings), unless -s is
       53 +                   specified.
  51   54  
  52      -       -c list
  53      -                    The list following -c specifies character positions (for
  54      -                    instance, -c1-72 would pass the first 72 characters of
  55      -                    each line).
       55 +     -n, --split, --nosplit
       56 +                   Controls whether multi-byte characters are split with the
       57 +                   -b option.  The default is to split characters and this can
       58 +                   be disabled with the -n or --nosplit flag.  Unless
       59 +                   specified, lines with no delimiters will be passed through
       60 +                   untouched.
  56   61  
       62 +     -r reclen, -R reclen, --reclen=reclen
       63 +                   If reclen is > 0, the input will be read as fixed length
       64 +                   records of length reclen when used with the -b or -c
       65 +                   options.
  57   66  
  58      -       -d delim
  59      -                    The character following -d is the field delimiter (-f
  60      -                    option only).  Default is tab. Space or other characters
  61      -                    with special meaning to the shell must be quoted. delim
  62      -                    can be a multi-byte character.
       67 +     -s, --suppress, --only-delimited
       68 +                   Suppress lines which do not contain any delimiter
       69 +                   characters (-f option only).
  63   70  
       71 +     -D ldelim, --line-delimiter=ldelim, --output-delimiter=ldelim
       72 +                   The line delimiter for the -f option is set to ldelim.  The
       73 +                   default is the newline character.
  64   74  
  65      -       -f list
  66      -                    The list following -f is a list of fields assumed to be
  67      -                    separated in the file by a delimiter character (see -d );
  68      -                    for instance, -f1,7 copies the first and seventh field
  69      -                    only. Lines with no field delimiters will be passed
  70      -                    through intact (useful for table subheadings), unless -s
  71      -                    is specified.
       75 +     -N, --newline, --nonewline
       76 +                   Controls whether to output a new-line at the end of each
       77 +                   record when used with the -b or -c options.  This is on by
       78 +                   default; -N turns it off and is the same as specifying
       79 +                   --nonewline.
  72   80  
       81 +     In the above options, list is a comma-separated or blank-character-
       82 +     separated list of integer field, byte or character numbers (in increasing
       83 +     order), with optional - to indicate ranges (for instance, 1,4,7; 1-3,8;
       84 +     -5,10 (short for 1-5,10); or 3- (short for third through last field).  )
  73   85  
  74      -       -n
  75      -                    Do not split characters. When -b list and -n are used
  76      -                    together, list is adjusted so that no multi-byte character
  77      -                    is split.
  78      -
  79      -
  80      -       -s
  81      -                    Suppresses lines with no delimiter characters in case of
  82      -                    -f option.  Unless specified, lines with no delimiters
  83      -                    will be passed through untouched.
  84      -
  85      -
  86   86  OPERANDS
  87      -       The following operands are supported:
       87 +     The following operands are supported:
  88   88  
  89      -       file
  90      -                A path name of an input file. If no file operands are
  91      -                specified, or if a file operand is -, the standard input will
  92      -                be used.
       89 +     file          A path name of an input file.  If no file operands are
       90 +                   specified, or if a file operand is -, the standard input
       91 +                   will be used.
  93   92  
       93 +EXIT STATUS
       94 +     0       All input files were output successfully.
  94   95  
  95      -USAGE
  96      -       See largefile(5) for the description of the behavior of cut when
  97      -       encountering files greater than or equal to 2 Gbyte (2^31 bytes).
       96 +     >0      An error occurred.
  98   97  
  99   98  EXAMPLES
 100      -       Example 1 Mapping user IDs
       99 +     Example 1 Mapping user IDs
 101  100  
      101 +        A mapping of user IDs to names follows:
 102  102  
 103      -       A mapping of user IDs to names follows:
      103 +            $ cut -d: -f1,5 /etc/passwd
 104  104  
      105 +     Example 2 Setting current login name
 105  106  
 106      -         example% cut -d: -f1,5 /etc/passwd
      107 +        To set name to current login name:
 107  108  
      109 +            $ name=`who am i | cut -f1 -d' '`
 108  110  
 109      -
 110      -       Example 2 Setting current login name
 111      -
 112      -
 113      -       To set name to current login name:
 114      -
 115      -
 116      -         example$ name=`who am i | cut -f1 -d' '`
 117      -
 118      -
 119      -
 120  111  ENVIRONMENT VARIABLES
 121      -       See environ(5) for descriptions of the following environment variables
 122      -       that affect the execution of cut: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES,
 123      -       and NLSPATH.
      112 +     See environ(5) for descriptions of the following environment variables
      113 +     that affect the execution of cut: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES,
      114 +     LC_NUMERIC, and NLSPATH.
 124  115  
 125      -EXIT STATUS
 126      -       The following exit values are returned:
      116 +INTERFACE STABILITY
      117 +     The command line interface of cut is Committed.  The output of cut is
      118 +     Committed.
 127  119  
 128      -       0
 129      -              All input files were output successfully.
 130      -
 131      -
 132      -       >0
 133      -              An error occurred.
 134      -
 135      -
 136      -ATTRIBUTES
 137      -       See attributes(5) for descriptions of the following attributes:
 138      -
 139      -
 140      -
 141      -
 142      -       +--------------------+-----------------+
 143      -       |  ATTRIBUTE TYPE    | ATTRIBUTE VALUE |
 144      -       +--------------------+-----------------+
 145      -       |CSI                 | Enabled         |
 146      -       +--------------------+-----------------+
 147      -       |Interface Stability | Standard        |
 148      -       +--------------------+-----------------+
 149      -
 150  120  SEE ALSO
 151      -       grep(1), paste(1), attributes(5), environ(5), largefile(5),
 152      -       standards(5)
      121 +     grep(1), paste(1), attributes(5), environ(5), largefile(5), standards(5)
 153  122  
 154      -DIAGNOSTICS
 155      -       cut: -n may only be used with -b
 156      -
 157      -
 158      -
 159      -
 160      -       cut: -d may only be used with -f
 161      -
 162      -
 163      -
 164      -
 165      -       cut: -s may only be used with -f
 166      -
 167      -
 168      -
 169      -
 170      -       cut: cannot open <file>
 171      -
 172      -           Either file cannot be read or does not exist.  If multiple files
 173      -           are present, processing continues.
 174      -
 175      -
 176      -       cut: no delimiter specified
 177      -
 178      -           Missing delim on -d option.
 179      -
 180      -
 181      -       cut: invalid delimiter
 182      -
 183      -
 184      -
 185      -
 186      -       cut: no list specified
 187      -
 188      -           Missing list on -b, -c, or -f option.
 189      -
 190      -
 191      -       cut: invalid range specifier
 192      -
 193      -
 194      -
 195      -
 196      -       cut: too many ranges specified
 197      -
 198      -
 199      -
 200      -
 201      -       cut: range must be increasing
 202      -
 203      -
 204      -
 205      -
 206      -       cut: invalid character in range
 207      -
 208      -
 209      -
 210      -
 211      -       cut: internal error processing input
 212      -
 213      -
 214      -
 215      -
 216      -       cut: invalid multibyte character
 217      -
 218      -
 219      -
 220      -
 221      -       cut: unable to allocate enough memory
 222      -
 223      -
 224      -
 225      -
 226      -
 227      -
 228      -                                April 29, 1999                          CUT(1)
      123 +illumos                        February 9, 2021                        illumos
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX