Main index | Section 1 | 日本語 | Deutsch | Options |
The list option argument is a comma or whitespace separated set of increasing numbers and/or number ranges. Number ranges consist of a number, a dash ('-'), and a second number and select the columns or fields from the first number to the second, inclusive. Numbers or number ranges may be preceded by a dash, which selects all columns or fields from 1 to the last number. Numbers or number ranges may be followed by a dash, which selects all columns or fields from the last number to the end of the line. Numbers and number ranges may be repeated, overlapping, and in any order. It is not an error to select columns or fields not present in the input line.
The options are as follows:
| |
The list specifies byte positions. | |
| |
The list specifies character positions. | |
| |
Use delim as the field delimiter character instead of the tab character. | |
| |
The
list
specifies fields, separated in the input by the field delimiter character
(see the
| |
| |
Do not split multi-byte characters. Characters will only be output if at least one byte is selected, and, after a prefix of zero or more unselected bytes, the rest of the bytes that form the character are selected. | |
| |
Suppress lines with no field delimiter characters. Unless specified, lines with no delimiters are passed through unmodified. | |
| |
Use whitespace (spaces and tabs) as the delimiter. Consecutive spaces and tabs count as one single field separator. | |
cut -d : -f 1,7 /etc/passwd
Show the names and login times of the currently logged in users:
who | cut -c 1-16,26-38
The
CUT (1) | August 3, 2017 |
Main index | Section 1 | 日本語 | Deutsch | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | If you are angry with someone, you should walk a mile in their shoes - then you'll be a mile away from them, and you'll have their shoes. | ” |