cut

Selects characters or fields from input lines

cut [options] [file-list]

The cut utility selects characters or fields from lines of input and writes them to standard output. Characters and fields are numbered starting with 1.

Arguments

The file-list is a list of ordinary files. If omitted, cut reads from standard input.

Options

--characters=clist

-c clist Selects the characters given by the column numbers in clist. The value of clist is one or more comma-separated column numbers or column ranges. A range is specified by separating two column numbers with a hyphen.

--fields=flist

-f flist Selects the fields specified in flist. The value of flist is one or more comma-separated field numbers or field ranges. A range is specified by separating ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.