File:  [MW Coherent from dump] / coherent / a / usr / man / COHERENT / cut
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent



cut                          Command                          cut




Select portions of each line of its input

ccuutt -cc_l_i_s_t [_f_i_l_e ...]
ccuutt -ff_l_i_s_t [-ss] [-dd _c_h_a_r] [_f_i_l_e ...]

ccuutt selects portions of each line of its input and writes them to
the standard output.  _l_i_s_t specifies the portions to select.  ccuutt
reads its input from _f_i_l_e, or the standard input by default.

_l_i_s_t  is  a  comma-separated set  of  numbers  or number  ranges.
Number ranges  consist of a number, a hyphen  (`-'), and a second
number, and select the fields or columns from the first number to
the second,  inclusive.  Preceding a number or  number range by a
hyphen  selects  all fields  or  columns from  one  to the  first
number.  Following  a number or number range  by a hyphen selects
all fields  or columns  from the  last number to  the end  of the
line.  Numbers  and number ranges  may be repeated,  overlap, and
appear in  any order.  It  is not an  error to select  a field or
column not present in the input line.

ccuutt recognizes the following command-line options:

-cc_l_i_s_t
    _l_i_s_t specifies character positions.

-ff_l_i_s_t
    _l_i_s_t specifies  fields, delimited in  the input by  one <ttaabb>
    character.   Output   fields  are  separated   by  one  <ttaabb>
    character.

-dd _c_h_a_r
    Use  _c_h_a_r  as  the  field  delimiter  instead  of  the  <ttaabb>
    character.

-ss  Suppress  lines with  no field-delimiter  characters.  Unless
    specified, ccuutt  passes through  unmodified all lines  with no
    delimiters.

ccuutt returns zero on success, one if an error occurred.

***** Examples *****

The following example displays all serial port device names found
in file /eettcc/ttttyyss.


        cut -c4- /etc/ttys


The following example  displays the _l_o_g_i_n _n_a_m_e and _h_o_m_e _d_i_r_e_c_t_o_r_y
fields from  the /eettcc/ppaasssswwdd password file.   Note that fields in
the password file are delimited by the colon character.




COHERENT Lexicon                                           Page 1




cut                          Command                          cut




        cut -d: -f1,6 /etc/passwd


***** See Also *****

aawwkk, ccoommmmaannddss, ppaassttee, sseedd

***** Notes *****

ccuutt is  copyright (c) 1988,1990 by The  Regents of the University
of California.  All rights reserved.

ccuutt is distributed as a service to COHERENT customers, as is.  It
is not supported by Mark Williams Company.  _C_a_v_e_a_t _u_t_i_l_i_t_o_r.










































COHERENT Lexicon                                           Page 2



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.