Subject: bug#28228: split issue?

From: Assaf Gordon <[email-masked]>
Date: Thu, 24 Aug 2017 15:59:43 -0600

tag 28228 notabug
close 28228
thanks

Hello,

On 24/08/17 02:02 PM, Xikai Jiang wrote:
> When I use 'split -d -l 3 my.file' to split a file, there seems to be a discontinuity in the numeric suffixes of the resulting files (x89 to x9000, see the attached image.)
> 
> Could you help on this issue?

behavior is by design.
Please read about it here:
  https://www.pixelbeat.org/docs/coreutils-gotchas.html#split

The reasoning is:
"It's done like that so there is no limit to the number of output files,
but also that those output files sort correctly with a lexical sort.
If you want consecutive numbers then specify enough digits with -a5 etc."
(from: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20874).

As such I'm closing this bug report, but discussion can continue
by replying to this thread.

regards,
 - assaf