diff options
author | Jérémy Compostella <jeremy.compostella@gmail.com> | 2012-03-01 20:37:41 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2012-03-10 19:36:13 +0000 |
commit | 7480e2db2935663b9c0c4d66418ce2801005792d (patch) | |
tree | 985c1f7989746dbc0ad21ef8b1cee876747f6f39 /doc | |
parent | 94c21417fe88d5e8944da5c686b381b2e9e9a028 (diff) | |
download | coreutils-7480e2db2935663b9c0c4d66418ce2801005792d.tar.xz |
split: support an arbitrary number of split files by default
* src/split.c (next_file_name): If `suffix_auto' is true and the first
suffix character is 'z', generate a new file file name adding `z' to
the prefix and increasing the suffix length by one.
(set_suffix_length): Disable auto suffix width in various cases.
* tests/split/suffix-auto-length: Test it.
* doc/coreutils.texi (split invocation): Mention it.
* NEWS (Improvements): Likewise.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/coreutils.texi | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi index cce9432bd..f9207e773 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -2990,9 +2990,15 @@ The output files' names consist of @var{prefix} (@samp{x} by default) followed by a group of characters (@samp{aa}, @samp{ab}, @dots{} by default), such that concatenating the output files in traditional sorted order by file name produces the original input file (except -@option{-nr/@var{n}}). If the output file names are exhausted, -@command{split} reports an error without deleting the output files -that it did create. +@option{-nr/@var{n}}). By default split will initially create files +with two generated suffix characters, and will increase this width by two +when the next most significant position reaches the last character. +(@samp{yz}, @samp{zaaa}, @samp{zaab}, @dots{}). In this way an arbitrary +number of output files are supported, which sort as described above, +even in the presence of an @option{--additional-suffix} option. +If the @option{-a} option is specified and the output file names are +exhausted, @command{split} reports an error without deleting the +output files that it did create. The program accepts the following options. Also see @ref{Common options}. @@ -3082,7 +3088,11 @@ and so can be a pipe for example. @itemx --suffix-length=@var{length} @opindex -a @opindex --suffix-length -Use suffixes of length @var{length}. The default @var{length} is 2. +Use suffixes of length @var{length}. If a @var{length} of 0 is specified, +this is the same as if (any previous) @option{-a} was not specified, and +thus enables the default behavior, which starts the suffix length at 2, +and unless @option{-n} or @option{--numeric-suffixes=@var{from}} are +specified, will auto increase the length by 2 as required. @item -d @itemx --numeric-suffixes[=@var{from}] @@ -3090,6 +3100,9 @@ Use suffixes of length @var{length}. The default @var{length} is 2. @opindex --numeric-suffixes Use digits in suffixes rather than lower-case letters. The numerical suffix counts from @var{from} if specified, 0 otherwise. +Note specifying a @var{from} value also disables the default +auto suffix length expansion described above, and so you may also +want to specify @option{-a} to allow suffixes beyond @samp{99}. @itemx --additional-suffix=@var{suffix} @opindex --additional-suffix |