home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d7xx / d747 / aush.lha / AUSH / ExtraCmds.lha / englishdocs / cut.doc < prev    next >
Text File  |  1992-09-04  |  2KB  |  71 lines

  1. NAME
  2.     cut - cut out selected fields of each line of a file
  3.  
  4. SYNOPSIS
  5.     cut -clist [file ...]
  6.     cut -flist [-dchar] [-s] [file ...]
  7.  
  8. DESCRIPTION
  9.     Use cut to cut out columns from a table or fields from each
  10.     line of a file; in data base parlance, it implements the
  11.     projection of a relation.  The fields as specified by list
  12.     can be fixed length, i.e., character positions as on a
  13.     punched card (-c option) or the length can vary from line to
  14.     line and be marked with a field delimiter character like tab
  15.     (-f option).  cut can be used as a filter : if no files are
  16.     given, the standard input is used. If you specify - as a file,
  17.     standard input will be used.
  18.  
  19.     The meanings of the options are:
  20.  
  21.     list        A comma-separated list of integer
  22.             field numbers (in increasing order),
  23.             with optional - to indicate ranges
  24.             (e.g.: 1,4,7 or 1-3,8) You can specify
  25.             -y for 1-y or x- for x till end, or
  26.             even - for all.
  27.  
  28.     -clist        The list following -c (no space)
  29.             specifies character positions
  30.             (e.g., -c1-72 would pass the first
  31.             72 characters of each line).
  32.  
  33.     -flist        The list following -f is a list of
  34.             fields assumed to be separated in
  35.             the file by a delimiter character
  36.             (see -d ); e.g., -f1,7 copies the
  37.             first and seventh field only.
  38.             Lines with no field delimiters will
  39.             be passed through intact (useful
  40.             for table subheadings), unless -s
  41.             is specified.
  42.  
  43.     -dchar        The character following -d is the
  44.             field delimiter (-f option only).
  45.             Default is tab.  Space or other
  46.             characters with special meaning to
  47.             the shell must be quoted.
  48.  
  49.     -s        Suppresses lines with no delimiter
  50.             characters in case of -f option.
  51.             Unless specified, lines with no
  52.             delimiters will be passed through
  53.             untouched.
  54.  
  55.     Either the -c or -f option must be specified as the first
  56.     command line option.
  57.  
  58. RETURN CODES
  59.     0 if all went well
  60.     1 in case of bad argument (fatal)
  61.     2 if at least one file couldn't be opened (non fatal)
  62.  
  63. CHANGES FROM UNIX
  64.     Doesn't complain when a list is x-y and y is greater than x,
  65.     but simply exchange values.
  66.  
  67. AUTHOR
  68.     Denis GOUNELLE
  69.     Last modified 04-Sep-92
  70.  
  71.