diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-05-06 01:48:40 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-05-13 12:43:40 +0100 |
commit | 703747f892d3ec4713b97d4bff770a80122cd1ef (patch) | |
tree | 97caf65ccdb43c5f01785ade78dbaf29c3cfc9ae /doc/coreutils.texi | |
parent | 79111d1553ff6603199b9e8e5f27269d55b095fb (diff) | |
download | coreutils-703747f892d3ec4713b97d4bff770a80122cd1ef.tar.xz |
split: auto set suffix len for --numeric-suffixes=<N --number=N
Supporting `split --numeric-suffixes=1 -n100` for example.
* doc/coreutils.texi (split invocation): Mention the two
use cases for the FROM parameter, and the consequences on
the suffix length determination.
* src/split.c (set_suffix_length): Use the --numeric-suffixes
FROM parameter in the suffix width calculation, when it's
less than the number of files specified in --number.
* tests/split/suffix-auto-length.sh: Add test cases.
Fixes http://bugs.gnu.org/20511
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r-- | doc/coreutils.texi | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 6a69b75ca..4ae06c30b 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -3181,9 +3181,14 @@ specified, will auto increase the length by 2 as required. @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}. + +@var{from} is used to either set the initial suffix for a single run, +or to set the suffix offset for independently split inputs, and consequently +the auto suffix length expansion described above is disabled. Therefore +you may also want to use option @option{-a} to allow suffixes beyond @samp{99}. +Note if option @option{--number} is specified and the number of files is less +than @var{from}, a single run is assumed and the minimum suffix length +required is automatically determined. @item --additional-suffix=@var{suffix} @opindex --additional-suffix |