]> git.ipfire.org Git - thirdparty/coreutils.git/commit
split: auto set suffix len for --numeric-suffixes=<N --number=N
authorPádraig Brady <P@draigBrady.com>
Wed, 6 May 2015 00:48:40 +0000 (01:48 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 13 May 2015 11:43:40 +0000 (12:43 +0100)
commit703747f892d3ec4713b97d4bff770a80122cd1ef
tree97caf65ccdb43c5f01785ade78dbaf29c3cfc9ae
parent79111d1553ff6603199b9e8e5f27269d55b095fb
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
doc/coreutils.texi
src/split.c
tests/split/suffix-auto-length.sh