Writes portions of each line from each file or/and standard input to standard output. list can be in terms of column position or fields delimited by a delim character.
Numbering starts from 1.

list

n1 n2,n3,n4 n5

a set of increasing numbers and/or ranges separated by comma or whitespace.

range

n1-n2

inclusive.

-n

from 1 to n

n-

from n to the end of the line.

numbers and ranges may be repeated, overlap, and occur in any order.

It is not an error to specify fields or columns not present in the input line.

-c list

character positions. field form may be a better choice with data containing times, dates or numbers containing varying width fields

-f list

fields separated by the field delimiter character (default: tab)

-d delim

field delimiter character default:tab .

-s

Suppress lines with no field delimiter. Default: output all lines.

-b list

byte positions (will be different from character if multi-byte characters).

-n

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.