CUT(1)

πŸ“¦
version 9.10 Β· 5 versions
, in ubuntu stonking

πŸ’– CUT(1) β€” like, the cut manual page, bestie πŸ’–

User Commands Β· GNU coreutils Β· cut πŸŽ€


✨ NAME ✨

cut β€” remove sections from each line of files πŸ¦‹

🌸 SYNOPSIS 🌸

cut OPTION... [FILE]...

πŸ’… DESCRIPTION πŸ’…

okay so basically: cut prints selected parts of lines from each FILE to standard output. that's it, that's the whole job, and it does it flawlessly, main character energy fr fr πŸ‘‘

With no FILE, or when FILE is -, it reads standard input. so stdin besties, you're covered too 🫢

Mandatory arguments to long options are mandatory for short options too. (yes that's a real sentence, no I did not make it up, it means if a long option needs a value, the short version needs one too πŸ’€)

  • -b, --bytes=LIST β€” select only these bytes ✨
  • -c, --characters=LIST β€” select only these characters 🌸
  • -d, --delimiter=DELIM β€” use DELIM instead of TAB for the field delimiter. not me switching off the tab life 🚫
  • -f, --fields=LIST β€” select only these fields; also print any line that contains no delimiter character, unless the -s option is specified πŸ‘€ (read that clause twice, it matters)
  • -n β€” (ignored) πŸ’€ literally vibing, does nothing
  • --complement β€” complement the set of selected bytes, characters or fields. flip the vibe check πŸ”„
  • -s, --only-delimited β€” do not print lines not containing delimiters. if it's not delimited, it's not invited πŸ™‚β€β†”οΈ
  • --output-delimiter=STRING β€” use STRING as the output delimiter; the default is to use the input delimiter πŸŽ€
  • -z, --zero-terminated β€” line delimiter is NUL, not newline. chaotic but iconic ⭐
  • --help β€” display this help and exit 🫢
  • --version β€” output version information and exit πŸ“œ

πŸ¦‹ THE LIST RULES (do not skip, bestie) πŸ¦‹

Use one, and only one of -b, -c or -f. one. pick your fighter, commit, periodt πŸ’…

Each LIST is made up of one range, or many ranges separated by commas. Selected input is written in the same order that it is read, and is written exactly once. no duplicates, no reordering, we are not messing around πŸ”₯

Each range is one of:

  • N β€” N'th byte, character or field, counted from 1
  • N- β€” from N'th byte, character or field, to end of line
  • N-M β€” from N'th to M'th (included) byte, character or field
  • -M β€” from first to M'th (included) byte, character or field

πŸ‘‘ AUTHOR πŸ‘‘

Written by David M. Ihnat, David MacKenzie, and Jim Meyering. legends only, we thank them for their service πŸ™‡β€β™€οΈ

😭 REPORTING BUGS 😭


πŸ” SEE ALSO πŸ”

Full documentation https://www.gnu.org/software/coreutils/cut

or available locally via:

info '(coreutils) cut invocation'

Packaged by Ubuntu (9.10-1ubuntu2).

Copyright Β© 2026 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. 🚨 (for real, don't come for them if it breaks, that's literally the deal)


that's a wrap, bestie πŸŽ€ this page is from GNU coreutils 9.10, dated August 2026, and yes the header said CUT(1) and the footer said the same thing, so consider yourself fully informed. go cut some fields. slay. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from