


      CCCCUUUUTTTT((((1111))))                      ((((UUUUNNNNIIIIXXXX 5555....0000))))                     CCCCUUUUTTTT((((1111))))



      NNNNAAAAMMMMEEEE
           cut - cut out selected fields of each line of a file

      SSSSYYYYNNNNTTTTAAAAXXXX
           ccccuuuutttt ----cccclist [file1 file2 ...]
           ccccuuuutttt ----fffflist [----ddddchar] [----ssss] [file1 file2 ...]

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           Use _c_u_t to cut out columns from a table or fields from each
           line of a file; in data base parlance, it implements the
           projection of a relation.  The fields as specified by _l_i_s_t
           can be fixed length, i.e., character positions as on a
           punched card (----cccc option), or the length can vary from line
           to line and be marked with a field delimiter character like
           _t_a_b (----ffff option).  _C_u_t can be used as a filter; if no files
           are given, the standard input is used.

           The meanings of the options are:

           _l_i_s_t     A comma-separated list of integer field numbers (in
                    increasing order), with optional ---- to indicate
                    ranges as in the ----oooo option of _n_r_o_f_f/_t_r_o_f_f for page
                    ranges; e.g., 1111,,,,4444,,,,7777; 1111----3333,,,,8888; ----5555,,,,11110000 (short for
                    1111----5555,,,,11110000); or 3333---- (short for third through last
                    field).

           ----cccc_l_i_s_t   The _l_i_s_t following ----cccc (no space) specifies
                    character positions (e.g., ----cccc1111----77772222 would pass the
                    first 72 characters of each line).

           ----ffff_l_i_s_t   The _l_i_s_t following ----ffff is a list of fields assumed
                    to be separated in the file by a delimiter
                    character (see ----dddd ); e.g. , ----ffff1111,,,,7777 copies the first
                    and seventh field only.  Lines with no field
                    delimiters will be passed through intact (useful
                    for table subheadings), unless ----ssss is specified.

           ----dddd_c_h_a_r   The character following ----dddd is the field delimiter
                    (----ffff option only).  Default is _t_a_b.  Space or other
                    characters with special meaning to the shell must
                    be quoted.

           ----ssss       Suppresses lines with no delimiter characters in
                    case of ----ffff option.  Unless specified, lines with no
                    delimiters will be passed through untouched.

           Either the ----cccc or ----ffff option must be specified.

      HHHHIIIINNNNTTTTSSSS
           Use _g_r_e_p(1) to make horizontal ``cuts'' (by context) through
           a file, or _p_a_s_t_e(1) to put files together column-wise (i.e.,
           horizontally).  To reorder columns in a table, use _c_u_t and



      Page 1                                                   (9010-E)






      CCCCUUUUTTTT((((1111))))                      ((((UUUUNNNNIIIIXXXX 5555....0000))))                     CCCCUUUUTTTT((((1111))))



           _p_a_s_t_e.

      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
           cut -d: -f1,5 /etc/passwd
                                 mapping of user IDs to names

           name=`who am i | cut -f1 -d" "`
                                 to set nnnnaaaammmmeeee to current login name.

      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
           _l_i_n_e _t_o_o _l_o_n_g
                       A line can have no more than 511 characters or
                       fields.

           _b_a_d _l_i_s_t _f_o_r _c/_f _o_p_t_i_o_n
                       Missing ----cccc or ----ffff option or incorrectly specified
                       _l_i_s_t.  No error occurs if a line has fewer
                       fields than the _l_i_s_t calls for.

           _n_o _f_i_e_l_d_s   The _l_i_s_t is empty.

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           grep(1), paste(1).
































      Page 2                                                   (9010-E)



