From unknown Thu Jun 19 13:53:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#25832 <25832@debbugs.gnu.org> To: bug#25832 <25832@debbugs.gnu.org> Subject: Status: split (v 8.25) with numeric suffixes beyond 89 Reply-To: bug#25832 <25832@debbugs.gnu.org> Date: Thu, 19 Jun 2025 20:53:04 +0000 retitle 25832 split (v 8.25) with numeric suffixes beyond 89 reassign 25832 coreutils submitter 25832 Holger Wolff severity 25832 normal tag 25832 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 19:57:38 2017 Received: (at submit) by debbugs.gnu.org; 22 Feb 2017 00:57:38 +0000 Received: from localhost ([127.0.0.1]:49433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgLFS-00058v-4d for submit@debbugs.gnu.org; Tue, 21 Feb 2017 19:57:38 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgLAN-00051s-8p for submit@debbugs.gnu.org; Tue, 21 Feb 2017 19:52:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgLAH-0007xy-6g for submit@debbugs.gnu.org; Tue, 21 Feb 2017 19:52:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38985) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgLAH-0007xu-3m for submit@debbugs.gnu.org; Tue, 21 Feb 2017 19:52:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgLAF-0006av-Rt for bug-coreutils@gnu.org; Tue, 21 Feb 2017 19:52:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgLAA-0007vw-S2 for bug-coreutils@gnu.org; Tue, 21 Feb 2017 19:52:15 -0500 Received: from smtprelay01.ispgateway.de ([80.67.18.43]:34993) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgLAA-0007ue-Lp for bug-coreutils@gnu.org; Tue, 21 Feb 2017 19:52:10 -0500 Received: from [130.194.160.74] by smtprelay01.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84) (envelope-from ) id 1cgLA5-0005BK-SN for bug-coreutils@gnu.org; Wed, 22 Feb 2017 01:52:06 +0100 To: bug-coreutils@gnu.org From: Holger Wolff Subject: split (v 8.25) with numeric suffixes beyond 89 Message-ID: Date: Wed, 22 Feb 2017 11:55:15 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Df-Sender: aG9sZ2VyQHdvbGZmaC5kZQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 21 Feb 2017 19:57:36 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello Incorrect numeric suffixes are sometimes produced when going beyond number 89: Assume a file "test.txt" with 1000 lines, and the command $ split -d -l 10 test.txt test_ I expect files test_00 through test_99, but what I get are test_00 through test_89 and test_9000 through test_9009. The same happens when I use $ split --numeric-suffixes -l 10 test.txt test_ but not when I use this line: $ split --numeric-suffixes=0 -l 10 test.txt test_ I have not found this bug mentioned before, but if I missed this, I am sorry. $ split --version split (GNU coreutils) 8.25 Copyright (C) 2016 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 Torbjörn Granlund and Richard M. Stallman. Thank you Holger From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 21:40:50 2017 Received: (at 25832) by debbugs.gnu.org; 22 Feb 2017 02:40:50 +0000 Received: from localhost ([127.0.0.1]:49453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgMrK-0007VD-1u for submit@debbugs.gnu.org; Tue, 21 Feb 2017 21:40:50 -0500 Received: from mail-qt0-f180.google.com ([209.85.216.180]:35362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgMrH-0007V1-TL for 25832@debbugs.gnu.org; Tue, 21 Feb 2017 21:40:48 -0500 Received: by mail-qt0-f180.google.com with SMTP id x35so54090372qtc.2 for <25832@debbugs.gnu.org>; Tue, 21 Feb 2017 18:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=W+gWI/C+AYzonp5G30XV2D4tBqR2eFWtY41mx0BCyrQ=; b=IuYMpF1S2rBlQypKj0Uw3+NoCYvVKUx3RKlQ1qnaSFSzy4RMQo2nutXB1c9wgepQJX lWvUX5P9qff2sYj7yh/+evdPxuhvjPrSwkpLFVt9EoB5oCxoStnXUP8K4WIA7rUx23b2 opFUkxczUQXWqAydJJB9KWIOjU2to0U7zGigvvmdgK+K2tYcQnC9N6w3MfZW6IxarINf bJ499AH/cQGvj/9dqiXw8C9n5DbSG7Zo5xz33FHPYwzWu4nW7j20Fx3tVtklROhipzoF au6XyY6ilnzZu7s1K9enmw/WphySqY1HYnAcrs9PUoBMJFROTCe8m0x4+/ryNQ93KDPU P+uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=W+gWI/C+AYzonp5G30XV2D4tBqR2eFWtY41mx0BCyrQ=; b=HCtOG2Iqaw5eQcBhCCyjbl2lhjFAIkQ9CzrTBj0x2j9XVpPPWrh5lTmU7pMHj6edto rtOLjnJSgweiqHwEq+7IuUwBUnNj2wH69c3CakRceY84/9f6KCG/E/UiIniAxyW8Tiay yx+MKaggIU7c7rEO8RABF1uyzWxr56gd8lCa3hFv03vh3UWIIMkyLglkaQSiZWNLoaEi 9TPbo6ZkcmYSmq0k5+6kvHDbXcdjmQBKipLEZ9tetA00H5IWs+Vl3fZvLGRSqfc+sRCM vzwtQlFOYtm5kpKqpEjF/4j5JByKS47aa/nN9pODaZPYVeCYZ3PxMa3187Jjk95W9txA yV2w== X-Gm-Message-State: AMke39lkfYGahV2EhnoKMsb598gqWBAI3i8twZSG9YVWEeX+atENPKsJq9YPvbhodCUmYw== X-Received: by 10.200.0.129 with SMTP id c1mr12632361qtg.288.1487731242295; Tue, 21 Feb 2017 18:40:42 -0800 (PST) Received: from ix.home (pool-100-37-92-116.nycmny.fios.verizon.net. [100.37.92.116]) by smtp.gmail.com with ESMTPSA id r20sm15155194qka.2.2017.02.21.18.40.40 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Feb 2017 18:40:40 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: bug#25832: split (v 8.25) with numeric suffixes beyond 89 From: Assaf Gordon In-Reply-To: Date: Tue, 21 Feb 2017 21:40:39 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <90332B2F-06B4-4FB9-AE5D-3F2E86928FD2@gmail.com> References: To: Holger Wolff X-Mailer: Apple Mail (2.2102) X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 25832 Cc: 25832@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) Hello, > On Feb 21, 2017, at 19:55, Holger Wolff = wrote: >=20 > Incorrect numeric suffixes are sometimes produced when going beyond = number 89: > Assume a file "test.txt" with 1000 lines, and the command >=20 > $ split -d -l 10 test.txt test_ >=20 > I expect files test_00 through test_99, but what I get are test_00 = through test_89 and test_9000 through test_9009. Thank you for the bug report. I can confirm this is reproducible in the latest revision. The immediate reason is that without a starting value, coreutil's split has a feature to 'widen' the filename, but the logic to widen it follows the alphabet widening and doesn't work well for numeric widening. That is, when not using numeric-suffixes, 'yz' (the last two letters) are widened to 'zaaa': $ seq 1000 | split -l 1 - foo_ will result in: ... foo_yy foo_yz foo_zaaa foo_zaab ... And you are seeing the last two digits ('89') widened in the same logic (to '9000'). Technically, if 'numeric_suffix_start' is left as 'null' in the parsing of --numeric-suffix: http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/split.c#n1455 then the widening logic behaves as if those were letters, not digits in 'split.c:next_file_name()': http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/split.c#n403 An immediate band-aid of defaulting to numeric_suffix_start=3D0 will result in an unintended consequences (a regression, perhaps): If more files needs to be created, an explicit numeric start value = prevents filename widening (this wasn't the case in your example because 1000 = lines fit in 100 files of 10 lines): # Works, filenames will be widened to 9010. $ seq 1001 | split -l 10 --numeric-suffix - foo_ # Widening is not allowed (from default of 2 digits), split fails: $ seq 1001 | split -l 10 --numeric-suffix=3D0 - foo_ split: output file suffixes exhausted What do others think: default to no-widening for numeric suffixes, or add code to 'next_file_name()' for numeric widening ? -assaf From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 22:32:11 2017 Received: (at 25832) by debbugs.gnu.org; 22 Feb 2017 03:32:11 +0000 Received: from localhost ([127.0.0.1]:49490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgNf1-0003rR-IU for submit@debbugs.gnu.org; Tue, 21 Feb 2017 22:32:11 -0500 Received: from midir.magicbluesmoke.com ([82.195.144.46]:54378 helo=mail.magicbluesmoke.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgNey-0003rI-Oz for 25832@debbugs.gnu.org; Tue, 21 Feb 2017 22:32:10 -0500 Received: from [10.0.0.126] (c-73-170-254-78.hsd1.ca.comcast.net [73.170.254.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id B763D4A51; Wed, 22 Feb 2017 03:32:04 +0000 (GMT) Subject: Re: bug#25832: split (v 8.25) with numeric suffixes beyond 89 To: Assaf Gordon , Holger Wolff References: <90332B2F-06B4-4FB9-AE5D-3F2E86928FD2@gmail.com> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <8914c6bc-6de1-a087-fb7d-feaadbc02fc6@draigBrady.com> Date: Tue, 21 Feb 2017 19:32:02 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <90332B2F-06B4-4FB9-AE5D-3F2E86928FD2@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25832 Cc: 25832@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) unarchive 20874 forcemerge 20874 25832 stop On 21/02/17 18:40, Assaf Gordon wrote: > Hello, > >> On Feb 21, 2017, at 19:55, Holger Wolff wrote: >> >> Incorrect numeric suffixes are sometimes produced when going beyond number 89: >> Assume a file "test.txt" with 1000 lines, and the command >> >> $ split -d -l 10 test.txt test_ >> >> I expect files test_00 through test_99, but what I get are test_00 through test_89 and test_9000 through test_9009. > > Thank you for the bug report. > > I can confirm this is reproducible in the latest revision. > > The immediate reason is that without a starting value, > coreutil's split has a feature to 'widen' the filename, > but the logic to widen it follows the alphabet widening > and doesn't work well for numeric widening. > > That is, when not using numeric-suffixes, > 'yz' (the last two letters) are widened to 'zaaa': > > $ seq 1000 | split -l 1 - foo_ > > will result in: > > ... > foo_yy > foo_yz > foo_zaaa > foo_zaab > ... > > And you are seeing the last two digits ('89') > widened in the same logic (to '9000'). > > > Technically, if 'numeric_suffix_start' > is left as 'null' in the parsing of --numeric-suffix: > http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/split.c#n1455 > > then the widening logic behaves as if those were letters, not digits > in 'split.c:next_file_name()': > http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/split.c#n403 > > > > An immediate band-aid of defaulting to numeric_suffix_start=0 > will result in an unintended consequences (a regression, perhaps): > If more files needs to be created, an explicit numeric start value prevents > filename widening (this wasn't the case in your example because 1000 lines fit in 100 files of 10 lines): > > # Works, filenames will be widened to 9010. > $ seq 1001 | split -l 10 --numeric-suffix - foo_ > > # Widening is not allowed (from default of 2 digits), split fails: > $ seq 1001 | split -l 10 --numeric-suffix=0 - foo_ > split: output file suffixes exhausted > > > What do others think: default to no-widening for numeric suffixes, > or add code to 'next_file_name()' for numeric widening ? This was discussed at http://bugs.gnu.org/20874 I'm not sure anything needs to be done here, since for backward compat for concat operations expecting lexical sort we use the current auto widening scheme. cheers, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 23:01:50 2017 Received: (at 25832) by debbugs.gnu.org; 22 Feb 2017 04:01:50 +0000 Received: from localhost ([127.0.0.1]:49501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgO7i-0004Xd-7Z for submit@debbugs.gnu.org; Tue, 21 Feb 2017 23:01:50 -0500 Received: from mail-qt0-f179.google.com ([209.85.216.179]:32891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgO7g-0004XR-IM for 25832@debbugs.gnu.org; Tue, 21 Feb 2017 23:01:49 -0500 Received: by mail-qt0-f179.google.com with SMTP id b16so79276503qte.0 for <25832@debbugs.gnu.org>; Tue, 21 Feb 2017 20:01:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=DUqgy1BWAu7X4Eifs/TjYZsEw3yCw2loX7KLpNIbDyY=; b=axog7iAz/Y6/0MrTu2WH6PKuverl0HvcWunbEGpLb6R1IBGClay/wM4XUYbr/3IxVJ 8H4dBpjGjKBSMqFMvWuWeAnUsOr1qGROkf5OSEf2AAYanzzOSY8ET3j3b++h1XWHaeAS fS4A0QpDmyih9lzf5eTAIFFenqZJB1pRjUyIqkmZr6DDzHNXuHsXBS5kgWdltx0Ua5cL P141VcEZ1I0eJH1IIY+PqFHX57w9IIpNlYBL/Tds/KrhMC/bnSjm/Dn5EXdsODsDEl4v 27glRWxmo6gSq4vemSa2upx9iKTe3oTKhMTEzxtPjBqaHvzab/VFW6jIWPt2K4ouKLAm p2PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=DUqgy1BWAu7X4Eifs/TjYZsEw3yCw2loX7KLpNIbDyY=; b=jF5AkqvBdW6eR99ulfKMBj/Lnj2ZYbj0ltthax0mfB0XgvEJwZWD+wu5XGagn61bt4 FW3GDL+6FUqGaOu4qUTbZ0lP6bHtQXxkcPpKraXYGVyBJ5SKjHVwt/z9iPrhZhZsf+QR 95r52s7DLtObLiPyd8EY2+mBjXcUwocj5HFyK13cr/dKL1QEcWZx3vBm1M+fHAtf+JVN xuybd4571Vt9uc7M0iwGZt9xg9yvv3FH6YJj/9izJbeaM5befF9ubGJSqf8KsphGVkPv SNhkgo8vrZQeud4Dn5VVtCqCvxfKejupxzoBaPaZP+j21XkRUFny/S97s/ZmotDGPjgL vXrw== X-Gm-Message-State: AMke39l51qyA1NoudRrffEsWrUi8+JRTY9DrJ+IXtq0+XETfB5fXizB+f0VBk4pcoSFVXw== X-Received: by 10.237.49.1 with SMTP id 1mr15192954qtg.114.1487736103029; Tue, 21 Feb 2017 20:01:43 -0800 (PST) Received: from ix.home (pool-100-37-92-116.nycmny.fios.verizon.net. [100.37.92.116]) by smtp.gmail.com with ESMTPSA id g66sm9518671qkb.55.2017.02.21.20.01.41 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Feb 2017 20:01:41 -0800 (PST) Content-Type: multipart/mixed; boundary="Apple-Mail=_187FECF3-A7D4-4426-9F89-9155AD753C5C" Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: bug#25832: split (v 8.25) with numeric suffixes beyond 89 From: Assaf Gordon In-Reply-To: <8914c6bc-6de1-a087-fb7d-feaadbc02fc6@draigBrady.com> Date: Tue, 21 Feb 2017 23:01:39 -0500 Message-Id: <82CA77AD-C7A2-4AFA-B87D-0523EDD28D07@gmail.com> References: <90332B2F-06B4-4FB9-AE5D-3F2E86928FD2@gmail.com> <8914c6bc-6de1-a087-fb7d-feaadbc02fc6@draigBrady.com> To: =?utf-8?Q?P=C3=A1draig_Brady?= X-Mailer: Apple Mail (2.2102) X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 25832 Cc: Holger Wolff , 25832@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) --Apple-Mail=_187FECF3-A7D4-4426-9F89-9155AD753C5C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > On Feb 21, 2017, at 22:32, P=E1draig Brady wrote: >=20 > This was discussed at http://bugs.gnu.org/20874 Missed that - sorry. I should've looked through the archives first... > I'm not sure anything needs to be done here, > since for backward compat for concat operations > expecting lexical sort we use the current auto widening scheme. I wonder if users who ask for --numeric-suffixes also implicitly prefer an intuitive order (one that won't work for lexical sorting but would with version sort). But that is a new feature, and perhaps a backwards-incompatible one. However the fact that "--numeric-suffixes=3D0" and "--numeric-suffixes" both start from zero but behave differently if there's more than 90 = output files is a bit unintuitive (because '=3D0' implies max-length). Perhaps worth adding to the 'coreutils gotchas' page? Attached is a suggestion for such text. regards, -assaf --Apple-Mail=_187FECF3-A7D4-4426-9F89-9155AD753C5C Content-Disposition: attachment; filename=split-gotcha.patch Content-Type: application/octet-stream; name="split-gotcha.patch" Content-Transfer-Encoding: 7bit --- coreutils-gotchas.html 2017-02-21 22:46:29.000000000 -0500 +++ coreutils-gotchas-split.html 2017-02-21 22:58:23.000000000 -0500 @@ -860,6 +860,56 @@ 10 +

split

+split has a feature to widen the letters in +the output file names if more files are needed beyond the default of +two letters. The widening scheme ensures file names are sorted correctly. +For example: + +
+$ seq 1000 | split -l 1 - foo_
+$ ls foo_*
+...
+foo_yy
+foo_yz
+foo_zaaa
+foo_zaab
+...
+
+ +split behaves the same with +--numeric-suffixes/-d option, which could +lead to unexpected numeric sequences: + +
+$ seq 1000 | split -l 10 -d - bar_
+$ ls bar_*
+...
+bar_88
+bar_89
+bar_9000
+bar_9001
+...
+
+ +The recommended solution is to use the +-a/--suffix-length parameter: +
+$ seq 1000 | split -a5 -l 10 -d - baz_
+$ ls baz_*
+bar_00000
+bar_00001
+...
+bar_00098
+bar_00099
+
+ +See relevant reports in bugs +#20874 and +#25832. + + +

Unit representations

The df, du, ls --block-size --Apple-Mail=_187FECF3-A7D4-4426-9F89-9155AD753C5C Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=windows-1252 --Apple-Mail=_187FECF3-A7D4-4426-9F89-9155AD753C5C-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 23:59:41 2017 Received: (at 25832) by debbugs.gnu.org; 22 Feb 2017 04:59:41 +0000 Received: from localhost ([127.0.0.1]:49542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgP1h-0007bB-Dc for submit@debbugs.gnu.org; Tue, 21 Feb 2017 23:59:41 -0500 Received: from midir.magicbluesmoke.com ([82.195.144.46]:57370 helo=mail.magicbluesmoke.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgP1f-0007b0-AL for 25832@debbugs.gnu.org; Tue, 21 Feb 2017 23:59:40 -0500 Received: from [10.0.0.126] (c-73-170-254-78.hsd1.ca.comcast.net [73.170.254.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id F0188988C; Wed, 22 Feb 2017 04:59:36 +0000 (GMT) Subject: Re: bug#25832: split (v 8.25) with numeric suffixes beyond 89 To: Assaf Gordon References: <90332B2F-06B4-4FB9-AE5D-3F2E86928FD2@gmail.com> <8914c6bc-6de1-a087-fb7d-feaadbc02fc6@draigBrady.com> <82CA77AD-C7A2-4AFA-B87D-0523EDD28D07@gmail.com> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <8801315a-e3f8-0a14-ddac-28b69ee1ee55@draigBrady.com> Date: Tue, 21 Feb 2017 20:59:34 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <82CA77AD-C7A2-4AFA-B87D-0523EDD28D07@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25832 Cc: Holger Wolff , 25832@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 21/02/17 20:01, Assaf Gordon wrote: > >> On Feb 21, 2017, at 22:32, Pádraig Brady wrote: >> >> This was discussed at http://bugs.gnu.org/20874 > > Missed that - sorry. I should've looked through the archives first... > >> I'm not sure anything needs to be done here, >> since for backward compat for concat operations >> expecting lexical sort we use the current auto widening scheme. > > I wonder if users who ask for --numeric-suffixes also > implicitly prefer an intuitive order (one that won't work > for lexical sorting but would with version sort). > > But that is a new feature, and perhaps a backwards-incompatible one. > > However the fact that "--numeric-suffixes=0" and "--numeric-suffixes" > both start from zero but behave differently if there's more than 90 output > files is a bit unintuitive (because '=0' implies max-length). > > Perhaps worth adding to the 'coreutils gotchas' page? > Attached is a suggestion for such text. Excellent, used that for the basis of the update at: https://www.pixelbeat.org/docs/coreutils-gotchas.html#split thanks! Pádraig From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 28 22:44:46 2018 Received: (at control) by debbugs.gnu.org; 29 Oct 2018 02:44:46 +0000 Received: from localhost ([127.0.0.1]:49583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGxXq-0000Ei-9f for submit@debbugs.gnu.org; Sun, 28 Oct 2018 22:44:46 -0400 Received: from mail-io1-f45.google.com ([209.85.166.45]:36528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGxXo-0000EW-OJ for control@debbugs.gnu.org; Sun, 28 Oct 2018 22:44:45 -0400 Received: by mail-io1-f45.google.com with SMTP id o19-v6so4037452iod.3 for ; Sun, 28 Oct 2018 19:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=bd+CgJKwWv+pcgMKfHCfU/z3Tzzim6RG5QaBJ44QFTQ=; b=t5cXUHr24ys7weQrDM2LmRkpwYMTC2JdDVr6EHFUXbO5ScX9M1FfN0sMSybWNLex6Z hN5mPpSACn1a884EwmzkVe8UbyJLZg2hSj/+ZLOIzkW6BcDrxAtzZli0++NAbX5LeynP vYAgtx91hU/BNt1ansppWfw7scGcpoEOociOcTLTp2h9Bk2hzcOQLocR7GcFwxkT6NdH m9goqPTjlkc3NB6NLheaIt4HuaclFPwvxMLVChIQgRAKI57VhMqsTTe25Dv1WtEwLy61 oSHjQAhlEJTSaMaKhPbEH1xadMxsgAuCEi8XKU1imfGbhwV1Y5Xmn277TR0bKvad57RC ijSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=bd+CgJKwWv+pcgMKfHCfU/z3Tzzim6RG5QaBJ44QFTQ=; b=biYguGEPKRS64HF4/CZKjftD1D1icxu4ino/olW0J/yPAGWEi6RfAxKMy4bBPhKL4E +fsiY1v4d4bpE87YFH6wTXYMObPYCmNQr2UnACGq5tqVP9gwzjOzIc5UBp/k+9aZazye j1rlSIdo1DOAyfAZnu4jBuUE6pK0WypmYfnCPx9hIZXwLiS1DQoyVHICIFsN75y/4kfd l6ANguV1KAXPlIHS2P0Hh64YyfrphTcueJuA8Px3PKsLO2SKggS6dqJC8kwzsBgrKC1q s16M9xNZR18I3ThTx5TMKZoe3exBBkjFrc7q2Kq3ctiHR/nZvw5yEuqbOEX5iC4vZt0M 8AVA== X-Gm-Message-State: AGRZ1gJdd8SlVhZbepD9E7Zr8qfsgQjE49bCXBUMHAzC54+FKHhK6+4u N74bUAsTflLH/94kfQ+4aKweP2e2nYc= X-Google-Smtp-Source: AJdET5cCoFyPWLwMuvi5+K+HOWsJMpKexp19d8mwRLdRrgIM32OB/6kiy53o06ThZCTLYmwcRjUT+Q== X-Received: by 2002:a6b:6201:: with SMTP id f1-v6mr7327081iog.11.1540781078571; Sun, 28 Oct 2018 19:44:38 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id b2-v6sm7395843ioc.51.2018.10.28.19.44.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Oct 2018 19:44:37 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: <78bc405f-9b21-c43c-bb93-f669a6484883@gmail.com> Date: Sun, 28 Oct 2018 20:44:33 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 20874 forcemerge 20874 25832 close 25832 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.166.45 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.45 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) unarchive 20874 forcemerge 20874 25832 close 25832 From unknown Thu Jun 19 13:53:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 26 Nov 2018 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator