Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/split



Module Name:    src
Committed By:   jschauma
Date:           Mon Jan 30 15:22:03 UTC 2023

Modified Files:
        src/usr.bin/split: split.1 split.c

Log Message:
auto-extend suffix length if required

If the input cannot be split into the number of files resulting from the
default suffix length, automatically extend the suffix length rather than
bailing out with 'too many files'.

Suffixes are extended such that the resulting files continue to sort
lexically and "cat *" would reproduce the input.  For example, splitting
a 1M lines file into (default) 1000 lines per file would yield files
named 'xaa', 'xab', ..., 'xyy', 'xyz', 'xzaaa', 'xzaab', ..., 'xzanl'.

If '-a' is specified, the suffix length is not auto-extended.

This behavior matches GNU sort(1) since around version 8.16.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/split/split.1
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/split/split.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index