version 1.5, 1999/07/04 11:53:52 |
version 1.6, 2000/03/05 20:09:21 |
|
|
The |
The |
.Nm |
.Nm |
utility selects portions of each line (as specified by |
utility selects portions of each line (as specified by |
.Ar list ) |
.Ar list ) |
from each |
from each |
.Ar file |
.Ar file |
(or the standard input by default), and writes them to the |
(or the standard input by default), and writes them to the |
|
|
The items specified by |
The items specified by |
.Ar list |
.Ar list |
can be in terms of column position or in terms of fields delimited |
can be in terms of column position or in terms of fields delimited |
by a special character. Column numbering starts from 1. |
by a special character. |
|
Column numbering starts from 1. |
.Pp |
.Pp |
.Ar list |
.Ar list |
is a comma or whitespace separated set of increasing numbers and/or |
is a comma or whitespace separated set of increasing numbers and/or |
|
|
Number ranges consist of a number, a dash |
Number ranges consist of a number, a dash |
.Pq Sq \- , |
.Pq Sq \- , |
and a second number |
and a second number |
and select the fields or columns from the first number to the second, |
which select the fields or columns from the first number to the second, |
inclusive. |
inclusive. |
Numbers or number ranges may be preceded by a dash, which selects all |
Numbers or number ranges may be preceded by a dash, which selects all |
fields or columns from 1 to the first number. |
fields or columns from 1 to the first number. |