aboutsummaryrefslogtreecommitdiff
path: root/man/split.1
diff options
context:
space:
mode:
authorSoccera1 <[email protected]>2026-07-28 16:08:14 +1000
committerSoccera1 <[email protected]>2026-07-28 16:08:48 +1000
commit9846f087eb28bf11df740675ef487657ded39b69 (patch)
treee91dbd19b524f9432da6bcb86b1fc193e0d02e26 /man/split.1
parent7fa396c9ef22b32a0b05e94aaa0266dd3e7515f8 (diff)
parent6a2f098e72e71437154ec00506e8e736aa8e1026 (diff)
downloadbnu-refactor/single-call-commands.tar.gz
bnu-refactor/single-call-commands.zip
Merge branch 'master' into refactor/single-call-commandsrefactor/single-call-commands
# Conflicts: # README.md
Diffstat (limited to 'man/split.1')
-rw-r--r--man/split.1117
1 files changed, 117 insertions, 0 deletions
diff --git a/man/split.1 b/man/split.1
new file mode 100644
index 0000000..8d64439
--- /dev/null
+++ b/man/split.1
@@ -0,0 +1,117 @@
+.\" Adapted for BNU from the GNU Coreutils 9.11 manual page; see doc/README.md.
+.TH SPLIT "1" "2026-07-28" "BNU 9.11" "BNU Commands"
+.SH NAME
+split \- split a file into pieces
+.SH SYNOPSIS
+.B split
+[\fI\,OPTION\/\fR]... [\fI\,FILE \/\fR[\fI\,PREFIX\/\fR]]
+.SH DESCRIPTION
+.\" This page is derived from GNU Coreutils documentation.
+This page documents BNU, an independent Bun implementation compatible with
+GNU Coreutils 9.11.
+.PP
+Output pieces of FILE to PREFIXaa, PREFIXab, ...;
+default size is 1000 lines, and default PREFIX is 'x'.
+.PP
+With no FILE, or when FILE is \-, read standard input.
+.PP
+Mandatory arguments to long options are mandatory for short options too.
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split-a'\fB\-a, \-\-suffix\-length=\,N\fP\X'tty: link'\/\fR
+generate suffixes of length N (default 2)
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split--additional-suffix'\fB\-\-additional\-suffix=SUFFIX\fP\X'tty: link'
+append an additional SUFFIX to file names
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split-b'\fB\-b, \-\-bytes=\,SIZE\fP\X'tty: link'\/\fR
+put SIZE bytes per output file
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split-C'\fB\-C, \-\-line\-bytes=\,SIZE\fP\X'tty: link'\/\fR
+put at most SIZE bytes of records per output file
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split-d'\fB\-d\fP\X'tty: link'
+use numeric suffixes starting at 0, not alphabetic
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split--numeric-suffixes'\fB\-\-numeric\-suffixes[=FROM]\fP\X'tty: link'
+same as \fB\-d\fR, but allow setting the start value
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split-x'\fB\-x\fP\X'tty: link'
+use hex suffixes starting at 0, not alphabetic
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split--hex-suffixes'\fB\-\-hex\-suffixes[=FROM]\fP\X'tty: link'
+same as \fB\-x\fR, but allow setting the start value
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split-e'\fB\-e, \-\-elide\-empty\-files\fP\X'tty: link'
+do not generate empty output files with '\-n'
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split--filter'\fB\-\-filter=COMMAND\fP\X'tty: link'
+write to shell COMMAND; file name is $FILE
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split-l'\fB\-l, \-\-lines=\,NUMBER\fP\X'tty: link'\/\fR
+put NUMBER lines/records per output file
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split-n'\fB\-n, \-\-number=\,CHUNKS\fP\X'tty: link'\/\fR
+generate CHUNKS output files; see explanation below
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split-t'\fB\-t, \-\-separator=\,SEP\fP\X'tty: link'\/\fR
+use SEP instead of newline as the record separator;
+\&'\e0' (zero) specifies the NUL character
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split-u'\fB\-u, \-\-unbuffered\fP\X'tty: link'
+immediately copy input to output with '\-n r/...'
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#split--verbose'\fB\-\-verbose\fP\X'tty: link'
+print a diagnostic just before each output file is opened
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/split#split--help'\fB\-\-help\fP\X'tty: link'
+display this help and exit
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/split#split--version'\fB\-\-version\fP\X'tty: link'
+output version information and exit
+.PP
+The SIZE argument is an integer and optional unit (example: 10K is 10*1024).
+Units are K,M,G,T,P,E,Z,Y,R,Q (powers of 1024) or KB,MB,... (powers of 1000).
+Binary prefixes can be used, too: KiB=K, MiB=M, and so on.
+.SS "CHUNKS may be:"
+.TP
+N
+split into N files based on size of input
+.TP
+K/N
+output Kth of N to standard output
+.TP
+l/N
+split into N files without splitting lines/records
+.TP
+l/K/N
+output Kth of N to standard output without splitting lines/records
+.TP
+r/N
+like 'l' but use round robin distribution
+.TP
+r/K/N
+likewise but only output Kth of N to standard output
+.PP
+\fB\-n\fR (except \fB\-nr\fR) will buffer to $TMPDIR, defaulting to \fI\,/tmp\/\fP,
+if the input size cannot easily be determined.
+.SH AUTHORS
+Upstream GNU Coreutils documentation authors:
+Written by Torbjorn Granlund and Richard M. Stallman.
+.br
+Adapted for BNU; the BNU implementation is independent.
+.SH "REPORTING BUGS"
+Report BNU bugs at <https://github.com/Soccera1/bnu/issues>.
+.br
+For upstream GNU Coreutils, see <https://www.gnu.org/software/coreutils/>.
+.SH COPYRIGHT
+Copyright \(co 2026 Free Software Foundation, Inc.
+.br
+This manual page was adapted for BNU in 2026.
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
+.br
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+.SH "SEE ALSO"
+Upstream documentation <https://www.gnu.org/software/coreutils/split>
+.br
+BNU documentation is available locally via: info \(aq(bnu) split invocation\(aq