cut in Mac OS X

By: Strauss K  

Divide a file into several parts.

       cut -b list [-n] [file ...]
       cut -c list [file ...]
       cut -f list [-d delim] [-s] [file ...]

     -b list     The list specifies byte positions.

     -c list     The list specifies character positions.

     -d delim    Use the first character of the string delim as the field delimiter
                 character instead of the tab character.

     -f list     The list specifies fields, delimited in the input by a single
                 tab character.  Output fields are separated by a single tab

     -n          Do not split multi-byte characters.

     -s          Suppresses lines with no field delimiter characters.  Unless
                 specified, lines with no delimiters are passed through unmodified.

cut exits 0 on success, 1 if an error occurred.

Archived Comments

1. Brettkip
View Tutorial          By: Brettkip at 2017-06-04 02:31:17

Most Viewed Articles (in macos )

Latest Articles (in macos)

Comment on this tutorial