CSPLIT(1)

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

✨ CSPLIT ✨

okay bestie so this is the csplit page from the User Commands section of the manual, aka the girl who chops your file into lil sections based on context lines. she's giving scissors, but make it regex πŸ’…

πŸ’– NAME πŸ’–

csplit β€” split a file into sections determined by context lines

🌸 SYNOPSIS 🌸

csplit [OPTION]... FILE PATTERN...

πŸ¦‹ DESCRIPTION πŸ¦‹

So what she does is: she outputs pieces of FILE separated by PATTERN(s) into files named 'xx00', 'xx01', ..., and then she prints the byte counts of each piece to standard output. the way she just hands you the receipts too?? iconic.

Read standard input if FILE is - β€” yes bestie, the classic little dash, she eats from stdin.

Mandatory arguments to long options are mandatory for short options too. fr fr, no skipping.

πŸŽ€ OPTIONS πŸŽ€

  • -b, --suffix-format=FORMAT β€” use sprintf FORMAT instead of %02d
  • -f, --prefix=PREFIX β€” use PREFIX instead of 'xx'
  • -k, --keep-files β€” do not remove output files on errors (she's keeping the mess, no cleanup era)
  • --suppress-matched β€” suppress the lines matching PATTERN
  • -n, --digits=DIGITS β€” use specified number of digits instead of 2
  • -s, --quiet, --silent β€” do not print counts of output file sizes
  • -z, --elide-empty-files β€” suppress empty output files
  • --help β€” display this help and exit
  • --version β€” output version information and exit

⭐ 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

A line OFFSET is an integer optionally preceded by '+' or '-'. yes, just the one lil guy, signed or not 🫢


🌈 AUTHOR 🌈

Written by Stuart Kemp and David MacKenzie. kings, honestly.

πŸ“ REPORTING BUGS πŸ“

Found a bug? spill it, not to me, to the mailing list:

πŸ’œ SEE ALSO πŸ’œ

  • Full documentation https://www.gnu.org/software/coreutils/csplit
  • or available locally via: info '(coreutils) csplit 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.
okay so real talk: that warranty situation is NO WARRANTY, capital letters, not a vibe, a fact. note it πŸ’€

and that's the whole page bestie, go forth and split. this was GNU coreutils 9.10, dated August 2026, and yes she served, periodt πŸ‘‘βœ¨

πŸ“¦ where this page comes from