Skip to content

Instantly share code, notes, and snippets.

@vhbui02
Created October 17, 2023 15:05
Show Gist options
  • Save vhbui02/24cbe10b3af85bc482c99e60e81e461c to your computer and use it in GitHub Desktop.
Save vhbui02/24cbe10b3af85bc482c99e60e81e461c to your computer and use it in GitHub Desktop.
[cut command] again, tomorrow i will have absolutely no idea what this is

cut OPTION [FILE]

FILE

If FILE is specified, it's a list of file names If FILE isn't specified, or when it's -, it's standard input => enable pipelining

Mandatory option

-d / --delimiter=DELIM: specify input delimiter character instead of TAB for file delimiter

--output-delimiter=STRING: use STRING as the output delimiter, rather than its default one which is also the input delimiter

-s / --only-delimited: DO NOT print lines that have zero delimiters.

Use one, and only one of -b, -c, -f Their value is a LIST, each LIST is made of 1 range, or many range seperated by commas. Each range is one of

A: A-th byte, character or field (one-based). A-: from A-th byte, character or field, to end of line. A-B: from A-th to B-th byte, character or field. -B: from 1st to B-th byte, character or field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment