SPLIT(1plan9)
πΈ SPLIT(1plan9) πΈ
okay bestie, welcome to the Plan 9 manual, section 1, and today's main character is split π
she's been in the Plan 9 manual forever and she's still serving.
β¨ NAME β¨
split β literally just chop a file into lil pieces π
π SYNOPSIS π
split [ option ... ] [ file ]
π DESCRIPTION π
so here's the vibe: split reads file (or standard input if you don't give it a file, she's flexible like that π¦) and writes it back out in pieces of 1000 lines per output file. iconic behavior honestly.
the output file names go xaa, xab, and so on all the way to xzz β¨ β yes bestie, that's the whole alphabet rotation, she's got range.
the options are:
-n nβ split into n-line pieces. that's it, that's the whole thing π-l nβ a synonym for-n n, a lil nod to Unix's syntax π«Ά (she said "I see you, Unix")-e expressionβ file divisions occur at each line that matches a regular expression; seeregexp(7). multiple-eoptions may appear, stack 'em up. and β this is the fun part β if a subexpression of expression is contained in parentheses(...), the output file name is the portion of the line which matches the subexpression. so the file basically names itself?? main character energy fr fr π-f stemβ use stem instead ofxin output file names. you're customizing the prefix, do your thing π-s suffixβ append suffix to names identified under-e. little finishing touch β¨-xβ exclude the matched input line from the output file. she's leaving that line on read π-iβ ignore case in option-e; and force output file names (excluding the suffix) to lower case. two-for-one, she ate π₯
π SOURCE π
/src/cmd/split.c
π¦ SEE ALSO π¦
sed(1), awk(1), grep(1), regexp(7)
π okay that's the whole page, no cap. every flag, every default, every file name range β all accounted for. go split something, bestie π§
and yes, the footer says SPLIT(1plan9) again, which is very much her walking in, saying her own name, and walking out π
β¨
π¦ where this page comes from
- debian bookworm: 9base 1:6-13 Β· Lucent
- debian trixie: 9base 1:6-14 Β· Lucent
- ubuntu jammy: 9base 1:6-11 Β· Lucent
- ubuntu noble: 9base 1:6-14 Β· Lucent
- ubuntu questing: 9base 1:6-15
- ubuntu resolute: 9base 1:6-15build1 Β· Lucent
- ubuntu stonking: 9base 1:6-15build1 Β· Lucent
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms