CSPLIT(1)
โจ CSPLIT(1) โจ
okay so bestie, this is csplit from the GNU coreutils manual โ page one of section one, user commands, the whole vibe. it's the little sister of split and she is unhinged in the best way ๐ she doesn't cut by size, she cuts by context. like, by meaning. main character energy fr fr ๐
๐ธ NAME ๐ธ
csplit โ split a file into sections determined by context lines. that's it, that's the girl. she takes one file and goes snip snip snip wherever the content tells her to ๐ฆ
โญ SYNOPSIS โญ
csplit [OPTION]... FILE PATTERN...
๐ DESCRIPTION ๐
So here's the tea ๐: csplit outputs pieces of FILE, separated by PATTERN(s), into files named 'xx00', 'xx01', ... โ and then, because she's an overachiever, she prints the byte counts of each piece to standard output. not me being obsessed with a byte count ๐ญ
If FILE is -, she reads standard input. iconic behaviour, honestly.
โ ๏ธ Real talk: mandatory arguments to long options are mandatory for short options too. no shortcuts, babe. the rules are the rules ๐
๐ OPTIONS ๐
-b,--suffix-format=FORMATโ usesprintfFORMAT instead of%02d. you wanna name your babies something else? go off โจ-f,--prefix=PREFIXโ use PREFIX instead of'xx'. so instead ofxx00you get whatever cute little prefix you dream up ๐ฆ-k,--keep-filesโ do not remove output files on errors. she's usually like "oops, cleanup time" but with this she holds onto everything ๐ซถ--suppress-matchedโ suppress the lines matching PATTERN. the matching line just... doesn't make it in. gone. ghosted ๐-n,--digits=DIGITSโ use specified number of digits instead of2. more digits, more drama ๐-s,--quiet,--silentโ do not print counts of output file sizes. sometimes you just don't wanna hear the numbers, and that's valid ๐-z,--elide-empty-filesโ suppress empty output files. no empty files on this account, we don't do that here ๐--helpโ display this help and exit. your girl is helpful ๐--versionโ output version information and exit. she'll tell you who she is โญ
๐ง Each PATTERN may be ๐ง
INTEGERโ copy up to but not including specified line number/REGEXP/[OFFSET]โ copy up to but not including a matching line%REGEXP%[OFFSET]โ skip to, but not including a matching line{INTEGER}โ repeat the previous pattern specified number of times{*}โ repeat the previous pattern as many times as possible
and one more lil note, bestie:
A line OFFSET is an integer optionally preceded by '+' or '-' ๐ธ
๐ AUTHOR ๐
Written by Stuart Kemp and David MacKenzie. legends, truly. we stan ๐ซถ
๐ REPORTING BUGS ๐
- Report bugs to: <bug-coreutils@gnu.org>.
- Report any translation bugs to: <https://translationproject.org/team/>.
- GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
- General help using GNU software: <https://www.gnu.org/gethelp/>
ngl if you found a bug, tell them!! they wanna know!! ๐โจ
๐ COPYRIGHT ๐
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. like, none. zero. don't come for her ๐
๐ฆ SEE ALSO ๐ฆ
- Full documentation <https://www.gnu.org/software/coreutils/csplit>
- or available locally via:
info '(coreutils) csplit invocation'
iykyk, the info page is right there, go read it ๐
GNU coreutils 9.12, September 2026 โ and that's the whole page, bestie!! you ate that. go split something with context. periodt ๐โจ๐
๐ฆ where this page comes from
- arch rolling: coreutils 9.12-2 ยท GPL-3.0-or-later AND GFDL-1.3-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms