bug#43684: Problem with numerical splitting with files > 90*l

2020-09-29 Thread ned haughton
Fair enough. I didn't see anything about that in the help or man page,
perhaps a note should be added there?

On Wed., 30 Sep. 2020, 7:11 am Pádraig Brady,  wrote:

> On 29/09/2020 15:20, Assaf Gordon wrote:
> >
> >> On 29/09/2020 02:18, ned haughton wrote:
> >>> When splitting with -d, the numbering screws up after 89:
> >
> > In addition to Pádraig explanation, please see previous similar
> > discussion here:
> >
> https://lists.gnu.org/archive/html/bug-coreutils/2017-02/msg00050.html
> > http://bugs.gnu.org/25832
>
> That reminds me it was also discussed at:
> http://www.pixelbeat.org/docs/coreutils-gotchas.html#split
>


bug#43684: Problem with numerical splitting with files > 90*l

2020-09-29 Thread Pádraig Brady

On 29/09/2020 15:20, Assaf Gordon wrote:



On 29/09/2020 02:18, ned haughton wrote:

When splitting with -d, the numbering screws up after 89:


In addition to Pádraig explanation, please see previous similar
discussion here:
https://lists.gnu.org/archive/html/bug-coreutils/2017-02/msg00050.html
http://bugs.gnu.org/25832


That reminds me it was also discussed at:
http://www.pixelbeat.org/docs/coreutils-gotchas.html#split





bug#43684: Problem with numerical splitting with files > 90*l

2020-09-29 Thread Assaf Gordon




On 29/09/2020 02:18, ned haughton wrote:

When splitting with -d, the numbering screws up after 89:


In addition to Pádraig explanation, please see previous similar 
discussion here:

  https://lists.gnu.org/archive/html/bug-coreutils/2017-02/msg00050.html
  http://bugs.gnu.org/25832

regards,
 - assaf





bug#43684: Problem with numerical splitting with files > 90*l

2020-09-29 Thread Pádraig Brady

tag 43684 notabug
close 43684
stop

On 29/09/2020 02:18, ned haughton wrote:

When splitting with -d, the numbering screws up after 89:


It behaves like that on purpose so that there is no limit on the
number of file names to split, and so that normal globbing will
result in the correct order
(so that `cat lat_lon_* > lat_lon_full` works as expected)


with --suffix-length=2 the numbering works correctly, and quits after 99.


Well if there is more data than can be accommodated in 100 files it will error 
like:

  $ truncate -s 101 file
  $ split -b1 -d --suffix-length=2 file
  split: output file suffixes exhausted

You can specify a larger --suffix-length to have both more
natural looking numbers, and correct globbing order.

thanks,
Pádraig





bug#43684: Problem with numerical splitting with files > 90*l

2020-09-28 Thread ned haughton

When splitting with -d, the numbering screws up after 89:

```
$ wc -l ../lat_lon_full
110324 ../lat_lon_full

$ split -d ../lat_lon_full lat_lon_

$ ls
lat_lon_00  lat_lon_09  lat_lon_18  lat_lon_27  lat_lon_36 lat_lon_45  
lat_lon_54  lat_lon_63  lat_lon_72  lat_lon_81 lat_lon_9000  
lat_lon_9009  lat_lon_9018
lat_lon_01  lat_lon_10  lat_lon_19  lat_lon_28  lat_lon_37 lat_lon_46  
lat_lon_55  lat_lon_64  lat_lon_73  lat_lon_82 lat_lon_9001  
lat_lon_9010  lat_lon_9019
lat_lon_02  lat_lon_11  lat_lon_20  lat_lon_29  lat_lon_38 lat_lon_47  
lat_lon_56  lat_lon_65  lat_lon_74  lat_lon_83 lat_lon_9002  
lat_lon_9011  lat_lon_9020
lat_lon_03  lat_lon_12  lat_lon_21  lat_lon_30  lat_lon_39 lat_lon_48  
lat_lon_57  lat_lon_66  lat_lon_75  lat_lon_84 lat_lon_9003  lat_lon_9012
lat_lon_04  lat_lon_13  lat_lon_22  lat_lon_31  lat_lon_40 lat_lon_49  
lat_lon_58  lat_lon_67  lat_lon_76  lat_lon_85 lat_lon_9004  lat_lon_9013
lat_lon_05  lat_lon_14  lat_lon_23  lat_lon_32  lat_lon_41 lat_lon_50  
lat_lon_59  lat_lon_68  lat_lon_77  lat_lon_86 lat_lon_9005  lat_lon_9014
lat_lon_06  lat_lon_15  lat_lon_24  lat_lon_33  lat_lon_42 lat_lon_51  
lat_lon_60  lat_lon_69  lat_lon_78  lat_lon_87 lat_lon_9006  lat_lon_9015
lat_lon_07  lat_lon_16  lat_lon_25  lat_lon_34  lat_lon_43 lat_lon_52  
lat_lon_61  lat_lon_70  lat_lon_79  lat_lon_88 lat_lon_9007  lat_lon_9016
lat_lon_08  lat_lon_17  lat_lon_26  lat_lon_35  lat_lon_44 lat_lon_53  
lat_lon_62  lat_lon_71  lat_lon_80  lat_lon_89 lat_lon_9008  lat_lon_9017


$ split --version
split (GNU coreutils) 8.30
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
.

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund and Richard M. Stallman.
```

with --suffix-length=2 the numbering works correctly, and quits after 99.

This is using the version of split bundled with kubuntu 20.04