

FIELD (1)                    7/10/80                    FIELD (1)




NAME
   field - manipulate fields of data

SYNOPSIS
   field [-t[c] | fieldlist] outputformat [file ...]

DESCRIPTION
   Field  is  used  to  manipulate data kept in formatted fields.
   It selects data from certain fields of  the  input  files  and
   copies it to certain places in the standard output. 
   
   The  'fieldlist' parameter is used to describe the interesting
   columns on the input file.  Fields  are  specified  by  naming
   the  columns in which they occur (e.g. 5-10) or the columns in
   which they start and an indication of their length (e.g.  3+2,
   meaning  a  field  which  starts  in  column  3  and  spans  2
   columns).  When specifying more than one field,  separate  the
   specs  with commas (e.g. 5-10,16,72+8) Fields may overlap, and
   need not be in ascending numerical order  (e.g.  1-25,10,3  is
   OK). 
   
   If  input  fields  do  not fall in certain columns, but rather
   are separated by some character (such as a blank or a  comma),
   describe  the  fields  by  using the '-tc' flag, replacing 'c'
   with  the  appropriate  separator  (a  tab  character  is  the
   default). 
   
   Once  fields have been described with either the '-tc' flag or
   a  fieldlist,  they  can  be  arranged  on   output   by   the
   'outputformat'  argument.  This argument is actually a picture
   of what the output line should look like.  Fields  from  input
   are  referred  to as $1, $2, $3, etc., referring to the first,
   second, third, etc. fields that  were  specified.   (Up  to  9
   fields  are  allowed, plus the argument $0 which refers to the
   whole line.) These $n symbols are placed in the output  format
   wherever  that  field  should  appear,  surrounded by whatever
   characters desired.  For example, an outputformat of:
                               "$2 somewords $1"
   would produce an output line such as:
                            field2 somewords field1
   
   If no input files are specified, or if  the  filename  '-'  is
   found, field will read from the standard input. 

DIAGNOSTICS
   illegal field specification
        The   fieldlist  specification  was  in  error,  probably
        because  it  contained  letters  or  some  other  illegal
        characters

SEE ALSO
   sedit

AUTHORS







FIELD (1)                    7/10/80                    FIELD (1)


   David Hanson and friends (U. of Arizona)




























































