CUT(1)
π cut(1) β the General Commands Manual's own slicing queen π
okay so bestie, welcome to cut(1), straight out of the General Commands Manual β¨ this is the little tool that takes every line of your files and, like, cuts the parts you want out of them. no cap, it's iconic.
πΈ NAME πΈ
cut β extract sections from each line of files. that's it. that's the whole job. she does one thing and she ate π
β¨ SYNOPSIS β¨
cut OPTION... [FILE]...
like, give her some options and maybe some files and she'll handle it π«Ά
π¦ DESCRIPTION π¦
extract sections from each line of files. literally her whole personality π you point at the columns you want, she hands them over, everybody's happy.
π OPTIONS π
so here's the menu, bestie β pick your fighter π
-b,--bytes<LIST> β extract the bytes listed in LIST. byte by byte, she's precise like that π-c,--characters<LIST> β extract the characters listed in LIST. character girlies rise πΈ-d,--delimiter<DELIM> β use DELIM as the field separator (default: Tab). yes bestie, Tab is the default, she's classy like that π-w,--whitespace-delimited[=<trimmed>]β use any whitespace (Space/Tab) as the delimiter. and if you passtrimmed, she also ignores leading and trailing blanks π§ the only possible value is:trimmed
-f,--fields<LIST> β extract the fields listed in LIST. the classic. the main character π-F<LIST> β like-f, but she merges adjacent delimiters, and the delimiter defaults to whitespace while the output delimiter defaults to a space. lowkey a whole different vibe π₯--complementβ invert the selection: print all the columns except the ones you specified. the "not you" of it all π-s,--only-delimitedβ suppress lines that don't contain the delimiter. if you're not delimited you're not invited π-z,--zero-terminatedβ useNULL(\0) instead of newline as the line terminator. for when newlines are just too mainstream β-O,--output-delimiter<NEW_DELIM> β replace the input delimiter with NEW_DELIM in the output. glow-up for your separators β¨-n,--no-partialβ with-b, do not output partial multi-byte characters. no half-finished characters on her watch π-h,--helpβ print help π«Ά-V,--versionβ print version π
π EXTRA π
if no FILE is specified, she reads from stdin β no big deal, she's flexible like that. and you can use '-' as a FILE argument to include stdin too π
LIST is a comma-separated list of numbers or ranges, iykyk:
N only column N
N- columns N through the end of the line
N-M columns N through M
-M columns 1 through M
examples, because seeing it > reading it, fr fr:
cut -f 2,5-7 file.txtβ extract fields 2, 5, 6, and 7cut -f 3- file.txtβ extract field 3 to the end of the linecut --complement -f 4-6 file.txtβ extract all fields except 4, 5, and 6cut -d',' -f1 file.csvβ extract first field from a CSV
bestie listen β ranges are inclusive of both ends for N-M, and the open-ended ones do exactly what they say. don't come for me if you typo your LIST, that's on you π
β VERSION β
v(uutils coreutils) 0.12.0
aaaand that's the page!! this cut(1) moment was served to you by v(uutils coreutils) 0.12.0, dated 2026-09-17, from the General Commands Manual β slay, go slice something, ily, bye πππ¦
π¦ where this page comes from
- arch rolling: uutils-coreutils 0.12.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms