From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [coreutils] Additional suffix for split Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 02 Jul 2010 19:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Peng Yu Cc: 6554@debbugs.gnu.org, coreutils@gnu.org X-Debbugs-Original-Cc: bug-coreutils , coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.127810038030695 (code B ref -1); Fri, 02 Jul 2010 19:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jul 2010 19:53:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUmIG-0007z2-Ah for submit@debbugs.gnu.org; Fri, 02 Jul 2010 15:53:00 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUmID-0007yx-NH for submit@debbugs.gnu.org; Fri, 02 Jul 2010 15:52:58 -0400 Received: from lists.gnu.org ([199.232.76.165]:37292) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OUmI9-0002sg-Cs for submit@debbugs.gnu.org; Fri, 02 Jul 2010 15:52:53 -0400 Received: from [140.186.70.92] (port=47009 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUmI7-0008GB-Tc for bug-coreutils@gnu.org; Fri, 02 Jul 2010 15:52:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUmI6-00038R-O1 for bug-coreutils@gnu.org; Fri, 02 Jul 2010 15:52:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52174) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUmI4-000386-D9; Fri, 02 Jul 2010 15:52:48 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o62JqkfD029878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 2 Jul 2010 15:52:46 -0400 Received: from [10.11.10.58] (vpn-10-58.rdu.redhat.com [10.11.10.58]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o62JqiWu002689; Fri, 2 Jul 2010 15:52:45 -0400 Message-ID: <4C2E4350.9030807@redhat.com> Date: Fri, 02 Jul 2010 13:51:44 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.2 Thunderbird/3.0.5 MIME-Version: 1.0 References: In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig106BF392DACA3A2C9312EE51" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -7.8 (-------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.7 (-------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig106BF392DACA3A2C9312EE51 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable [adding bug-coreutils, to create a bug id to track this by] On 06/15/2010 09:23 PM, Peng Yu wrote: > I need to add an additional common suffix to the files splited by > split. Right now, I have to use mv to do so. But I feel it is > convenient to have an option to add the suffix. Is this feature going > to be considered to be added in the future? Hmm, considering that we recently taught mktemp how to honor suffixes, it does indeed sound like this might be a useful feature addition. It's probably not going to be my highest priority to write such a patch, but I'll gladly review any patch written by someone else. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig106BF392DACA3A2C9312EE51 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJMLkNQAAoJEKeha0olJ0NqHaEH/iVmJkEAJrEfJbGzKe/ti9hc s7puDaS1cD43vjzOIxkQvDZ3XREOMPfgmbmiSqvlAOxXkPbt9jsbre6ZCCxZBpIX 49r4qYLmtZjsoo5KGHXCJVtOSs8CTcempy0Ji0rYKJSyyzrmtVY0TUFze6h7+QwU ZJqWQ/6GhNHkXqQ0ODcB+5LTnEoIRJpQ9H/ofiBDj7ZSCNDQHBvkOqs6PoC3I9K1 bYGMmzjSJCm1vl6JRtOdCD+DKw6Vdb/85uob7E+rGnILkBEZjN1FgjtIKEcARzPW I45XMn+cWkg+7ErYky3moTMZgsn1LgORcAgGpczobP8+DXZiR+Ge0jHTAHYcxfk= =WSig -----END PGP SIGNATURE----- --------------enig106BF392DACA3A2C9312EE51-- From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [coreutils] Additional suffix for split Resent-From: Peng Yu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sun, 13 Feb 2011 19:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Eric Blake Cc: 6554@debbugs.gnu.org, coreutils@gnu.org Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.129762479612290 (code B ref 6554); Sun, 13 Feb 2011 19:20:02 +0000 Received: (at 6554) by debbugs.gnu.org; 13 Feb 2011 19:19:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PohUB-0003CB-Jl for submit@debbugs.gnu.org; Sun, 13 Feb 2011 14:19:55 -0500 Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PohU9-0003Bz-HJ for 6554@debbugs.gnu.org; Sun, 13 Feb 2011 14:19:53 -0500 Received: by wyf23 with SMTP id 23so4236338wyf.3 for <6554@debbugs.gnu.org>; Sun, 13 Feb 2011 11:28:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=AIniX1urEG+LxHSvGs7BmrP/zlI9CgZYUVya6y3JIco=; b=JRInHChBiuu5dfVRV0adru/YehBPGP8wOydf/l9zIWzAvXO4wNOWYe7tAP93ANfOkb q4NRLCaPJcvSN6gxLiXHAHwFNk0c3Df2TXUA0ZEmsvT2h69AqcwN0vC7zgizbHet5CcZ 8VVR7dDxiM4SEao6ztxqHTZJtQ70OxC0ofjIU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=eiCOW20Bb42tnKkOWRT53ywXx0ImRb/g2l7z2ad8tGJQDNzEn0rP+gXmxxZ1pqWtq+ 3eBSA9FWSPb9oDLr3jg23eQlDgK+rG+E1NyEOlngjoq2gvgbs3YhSYAI1LUvhs9q2FAr NPucVmHM7+kPGVc5cwAHQ4Dfb6Opo/y7HPGUM= MIME-Version: 1.0 Received: by 10.216.177.7 with SMTP id c7mr2430929wem.60.1297625328474; Sun, 13 Feb 2011 11:28:48 -0800 (PST) Received: by 10.217.5.9 with HTTP; Sun, 13 Feb 2011 11:28:48 -0800 (PST) In-Reply-To: <4C2E4350.9030807@redhat.com> References: <4C2E4350.9030807@redhat.com> Date: Sun, 13 Feb 2011 13:28:48 -0600 Message-ID: From: Peng Yu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) On Fri, Jul 2, 2010 at 2:51 PM, Eric Blake wrote: > [adding bug-coreutils, to create a bug id to track this by] > > On 06/15/2010 09:23 PM, Peng Yu wrote: >> I need to add an additional common suffix to the files splited by >> split. Right now, I have to use mv to do so. But I feel it is >> convenient to have an option to add the suffix. Is this feature going >> to be considered to be added in the future? > > Hmm, considering that we recently taught mktemp how to honor suffixes, > it does indeed sound like this might be a useful feature addition. =A0It'= s > probably not going to be my highest priority to write such a patch, but > I'll gladly review any patch written by someone else. I'm wondering if this feature has been added to 'split'. --=20 Regards, Peng From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) References: <4C2E4350.9030807@redhat.com> In-Reply-To: <4C2E4350.9030807@redhat.com> Resent-From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 27 Jan 2012 17:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Eric Blake , Peng Yu Cc: 6554@debbugs.gnu.org, coreutils@gnu.org Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.132768535031270 (code B ref 6554); Fri, 27 Jan 2012 17:30:02 +0000 Received: (at 6554) by debbugs.gnu.org; 27 Jan 2012 17:29:10 +0000 Received: from localhost ([127.0.0.1]:46993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rqpbq-00088I-6o for submit@debbugs.gnu.org; Fri, 27 Jan 2012 12:29:10 -0500 Received: from mail-we0-f172.google.com ([74.125.82.172]:48502) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rqpbm-00087n-Mr for 6554@debbugs.gnu.org; Fri, 27 Jan 2012 12:29:08 -0500 Received: by werm10 with SMTP id m10so1414634wer.3 for <6554@debbugs.gnu.org>; Fri, 27 Jan 2012 09:28:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:cc:date:message-id:mime-version:content-type; bh=6VJ+nhxHmQpjzpFPWURts+Wrt1jt85yrCO2FOLDBNg4=; b=ZzmJWt5e5PoBAbJ2M65YPsU8/7PK0PyF0F9XBVVBlu2UEDlK6EdHp1IoZHsAogkJos Iq40UmBazXcnnXWE6Kh3E2s4cIeS7wtD+MFlwLexdgYTmJd2pTzX9nnpxhKoioLhPb7f SpNvbV2Tp88soJBB7T3RI79HINOc9JYQvKDVM= Received: by 10.216.136.156 with SMTP id w28mr3419602wei.11.1327685302021; Fri, 27 Jan 2012 09:28:22 -0800 (PST) Received: from Apollo.jerryland.fr (pierre.csie.fr. [212.51.164.178]) by mx.google.com with ESMTPS id l12sm14105007wiw.0.2012.01.27.09.28.20 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jan 2012 09:28:21 -0800 (PST) From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Date: Fri, 27 Jan 2012 18:28:39 +0100 Message-ID: <8762fxdph4.fsf@Apollo.jerryland.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eric, Peng, others, > On 06/15/2010 09:23 PM, Peng Yu wrote: > > I need to add an additional common suffix to the files splited by > > split. Right now, I have to use mv to do so. But I feel it is > > convenient to have an option to add the suffix. Is this feature going > > to be considered to be added in the future? >=20 > Hmm, considering that we recently taught mktemp how to honor suffixes, > it does indeed sound like this might be a useful feature addition. It's > probably not going to be my highest priority to write such a patch, but > I'll gladly review any patch written by someone else. I'm interested in this feature too so I wrote the attached patch which implements it by adding the "--suffix=3DSUFF" option. As this is my first contribution to this project, I'm not conformable with coreutils coding standard or documentation needs, so feel free to comment the submitted patch. I will take into account whatever you ask for. Cheers, J=C3=A9r=C3=A9my --- --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-split-Additional-suffix-for-split-bug-6554.patch Content-Description: [PATCH] split: Additional suffix for split (bug#6554) >From cc808cd440c0f578a4f2f36345f8f1bc48ebe0ae Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Fri, 27 Jan 2012 18:14:34 +0100 Subject: [PATCH] split: Additional suffix for split (bug#6554) Add support to an additionnal suffix with the new '--suffix" option. Signed-off-by: Jeremy Compostella --- src/split.c | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/split.c b/src/split.c index 5fbce0e..c86a014 100644 --- a/src/split.c +++ b/src/split.c @@ -80,6 +80,13 @@ static size_t suffix_length; /* Alphabet of characters to use in suffix. */ static char const *suffix_alphabet = "abcdefghijklmnopqrstuvwxyz"; +/* Length of fixed suffix. */ +static size_t fixed_suffix_len = 0; + +/* Fixed suffix to append to OUTFILE right after the dynamic + suffix. */ +static char const *fixed_suffix; + /* Name of input file. May be "-". */ static char *infile; @@ -110,7 +117,8 @@ enum { VERBOSE_OPTION = CHAR_MAX + 1, FILTER_OPTION, - IO_BLKSIZE_OPTION + IO_BLKSIZE_OPTION, + SUFFIX_OPTION }; static struct option const longopts[] = @@ -122,6 +130,7 @@ static struct option const longopts[] = {"elide-empty-files", no_argument, NULL, 'e'}, {"unbuffered", no_argument, NULL, 'u'}, {"suffix-length", required_argument, NULL, 'a'}, + {"suffix", required_argument, NULL, SUFFIX_OPTION}, {"numeric-suffixes", no_argument, NULL, 'd'}, {"filter", required_argument, NULL, FILTER_OPTION}, {"verbose", no_argument, NULL, VERBOSE_OPTION}, @@ -193,6 +202,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ "), stdout); fprintf (stdout, _("\ -a, --suffix-length=N use suffixes of length N (default %d)\n\ + --suffix=SUFF append SUFF to each output filename. SUFF must\n\ + not contain slash\n\ -b, --bytes=SIZE put SIZE bytes per output file\n\ -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file\n\ -d, --numeric-suffixes use numeric suffixes instead of alphabetic\n\ @@ -237,13 +248,15 @@ next_file_name (void) /* Allocate and initialize the first file name. */ size_t outbase_length = strlen (outbase); - size_t outfile_length = outbase_length + suffix_length; + size_t outfile_length = outbase_length + suffix_length + fixed_suffix_len; if (outfile_length + 1 < outbase_length) xalloc_die (); outfile = xmalloc (outfile_length + 1); outfile_mid = outfile + outbase_length; memcpy (outfile, outbase, outbase_length); memset (outfile_mid, suffix_alphabet[0], suffix_length); + if (fixed_suffix_len) + memcpy (outfile_mid + suffix_length, fixed_suffix, fixed_suffix_len); outfile[outfile_length] = 0; sufindex = xcalloc (suffix_length, sizeof *sufindex); @@ -1036,6 +1049,13 @@ main (int argc, char **argv) } break; + case SUFFIX_OPTION: + { + fixed_suffix = optarg; + fixed_suffix_len = strlen (fixed_suffix); + } + break; + case 'b': if (split_type != type_undef) FAIL_ONLY_ONE_WAY (); -- 1.7.2.5 --=-=-=-- From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 28 Jan 2012 14:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Cc: 6554@debbugs.gnu.org, Eric Blake , coreutils@gnu.org, Peng Yu Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.13277621899193 (code B ref 6554); Sat, 28 Jan 2012 14:50:02 +0000 Received: (at 6554) by debbugs.gnu.org; 28 Jan 2012 14:49:49 +0000 Received: from localhost ([127.0.0.1]:47686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rr9bA-0002OD-Od for submit@debbugs.gnu.org; Sat, 28 Jan 2012 09:49:49 -0500 Received: from mail3.vodafone.ie ([213.233.128.45]:47684) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rr9b8-0002Nx-26 for 6554@debbugs.gnu.org; Sat, 28 Jan 2012 09:49:47 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBANYJJE9tTehq/2dsb2JhbAAMN4Q5UqxFAQEBBAECCRcPAUYQCQINCwICBQwKCwICCQMCAQIBFi8GDQEHAQEWh2unIJEwgS+GexIBBQMFBgEDDgYJCgovgmUdDBIPYglEghKBFgSSc4gfjFk Received: from unknown (HELO [192.168.1.79]) ([109.77.232.106]) by mail3.vodafone.ie with ESMTP; 28 Jan 2012 14:48:55 +0000 Message-ID: <4F240AD6.6080900@draigBrady.com> Date: Sat, 28 Jan 2012 14:48:54 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 References: <4C2E4350.9030807@redhat.com> <8762fxdph4.fsf@Apollo.jerryland.fr> In-Reply-To: <8762fxdph4.fsf@Apollo.jerryland.fr> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 01/27/2012 05:28 PM, Jérémy Compostella wrote: > Eric, Peng, others, > >> On 06/15/2010 09:23 PM, Peng Yu wrote: >>> I need to add an additional common suffix to the files splited by >>> split. Right now, I have to use mv to do so. But I feel it is >>> convenient to have an option to add the suffix. Is this feature going >>> to be considered to be added in the future? >> >> Hmm, considering that we recently taught mktemp how to honor suffixes, >> it does indeed sound like this might be a useful feature addition. It's >> probably not going to be my highest priority to write such a patch, but >> I'll gladly review any patch written by someone else. > > I'm interested in this feature too so I wrote the attached patch which > implements it by adding the "--suffix=SUFF" option. > > As this is my first contribution to this project, I'm not conformable > with coreutils coding standard or documentation needs, so feel free to > comment the submitted patch. I will take into account whatever you ask > for. > > Cheers, > > Jérémy > --- Thanks a lot for working on this. Could you give a real world example where you find this useful, just for the record. I should note that --suffix is incompatible with a variable length generated suffix. I.E. one that would allow for arbitrary sized input: http://lists.gnu.org/archive/html/bug-coreutils/2009-09/msg00220.html Though I guess that functionality could still be provided if required, by specifying --suffix-length=auto and having that mutually exclusive with --suffix. As for the patch, it seems to work :) t$ seq 10 > file.txt t$ ../split -n10 --suffix=.txt file.txt file. t$ l -rw-rw-r--. 1 padraig 21 Jan 28 14:06 file.txt -rw-rw-r--. 1 padraig 3 Jan 28 14:06 file.aj.txt -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ai.txt -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ah.txt -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ag.txt -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.af.txt -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ae.txt -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ad.txt -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ac.txt -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ab.txt -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.aa.txt We'd need some corresponding documentation in doc/coreutils.texi, and an entry in NEWS. Also even thought the patch is small, you'd need to start the copyright assignment process for a new parameter to `split`. cheers, Pádraig. From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) References: <4C2E4350.9030807@redhat.com> In-Reply-To: <4C2E4350.9030807@redhat.com> Resent-From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 28 Jan 2012 23:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 6554@debbugs.gnu.org, Eric Blake , coreutils@gnu.org, Peng Yu Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.132779507214744 (code B ref 6554); Sat, 28 Jan 2012 23:58:01 +0000 Received: (at 6554) by debbugs.gnu.org; 28 Jan 2012 23:57:52 +0000 Received: from localhost ([127.0.0.1]:42590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrI9Y-0003pk-1Q for submit@debbugs.gnu.org; Sat, 28 Jan 2012 18:57:52 -0500 Received: from mail-ww0-f46.google.com ([74.125.82.46]:53313) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrI9U-0003pU-Dz for 6554@debbugs.gnu.org; Sat, 28 Jan 2012 18:57:50 -0500 Received: by wgbdt14 with SMTP id dt14so3033762wgb.15 for <6554@debbugs.gnu.org>; Sat, 28 Jan 2012 15:57:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:cc:date:message-id:mime-version:content-type; bh=6jThCbLHo2XBa3DPctfa+2JqsyZgIPRGBVjmbnEf3kw=; b=SE8LCsE9igVjGaYu8MKGs4RAjnQIi9IcNjr/09AS+XKUOIRUr5q9giV6mPPwyRmPKg 6sB3X+SIPS8BITtE33qlPOyQLzkoXVXNUwKdnYmWZ2Herb0Nht48h27GYg6q4ouTykUI yAUv3ovdQI1EFWvSLMqIpgoeseM309LocNXso= Received: by 10.180.90.212 with SMTP id by20mr19382484wib.12.1327795061858; Sat, 28 Jan 2012 15:57:41 -0800 (PST) Received: from Apollo.jerryland.fr ([85.69.251.50]) by mx.google.com with ESMTPS id l6sm20788315wiv.11.2012.01.28.15.57.40 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 28 Jan 2012 15:57:40 -0800 (PST) From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Date: Sun, 29 Jan 2012 00:57:59 +0100 Message-ID: <87vcnvcrco.fsf@Apollo.jerryland.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable P=C3=A1draig Brady wrotes: > Thanks a lot for working on this. > Could you give a real world example where > you find this useful, just for the record. It's useful in some cases where the chunk files type is known. As for example, when I split a file which is a concatenation of several bitmap files of the same size. Automatically append the appropriate suffix "type" is time saving and comfortable. Another example is when the split does not alter the file "type" as in the example you provided below, input and output files are "txt" files. Having the appropriate suffix automatically appended to the chunk file names make these files easily available to applications which care about the file suffix. > I should note that --suffix is incompatible > with a variable length generated suffix. > I.E. one that would allow for arbitrary sized input: > http://lists.gnu.org/archive/html/bug-coreutils/2009-09/msg00220.html > Though I guess that functionality could still be > provided if required, by specifying --suffix-length=3Dauto > and having that mutually exclusive with --suffix. First, after having carefully read the thread you are talking about I did not find any implementation of this in the current coreutils repository. Anyway, this feature is interesting and I would be glad to implement it if needs too but in another commit. Second, I don't get your point. Why it should not be possible to append a fixed length suffix to output files with a variable length dynamic suffix ? I do not figure out why it's incompatible. What do I misunderstood ? For example, the following hypothetical split command call looks perfectly compatible: $ split -n10 --suffix-length=3Dauto --suffix=3D.txt file.txt file. $ ls file.aa.txt file.ab.txt file.ac.txt file.ad.txt file.ae.txt file.af.txt file.ag.txt file.ah.txt file.ai.txt file.aj.txt [...] file.yv.txt file.yw.txt file.yx.txt file.yy.txt file.yz.txt file.zaaa.txt file.zaab.txt file.zaac.txt file.zaad.txt file.zaae.txt file.zaaf.txt > As for the patch, it seems to work :) >=20 > t$ seq 10 > file.txt > t$ ../split -n10 --suffix=3D.txt file.txt file. > t$ l > -rw-rw-r--. 1 padraig 21 Jan 28 14:06 file.txt > -rw-rw-r--. 1 padraig 3 Jan 28 14:06 file.aj.txt > -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ai.txt > -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ah.txt > -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ag.txt > -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.af.txt > -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ae.txt > -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ad.txt > -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ac.txt > -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ab.txt > -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.aa.txt > We'd need some corresponding documentation in doc/coreutils.texi, > and an entry in NEWS. I added the corresponding documentation in both of files. I've done my best but feel free to comment my additions. > Also even thought the patch is small, you'd need to start > the copyright assignment process for a new parameter to `split`. I filled out and sent my coreutils assignment form. Cheers, J=C3=A9r=C3=A9my --- --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-split-Additional-suffix-for-split-bug-6554.patch Content-Description: split: Additional suffix for split (bug#6554) patch >From 587e15898a947cf22539bf7f782b7963284dc1e4 Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Fri, 27 Jan 2012 18:14:34 +0100 Subject: [PATCH] split: Additional suffix for split (bug#6554) Add support to an additionnal suffix with the new `--suffix=SUFF' option. SUFF is appended to each output filename right after the dynamic suffix. Signed-off-by: Jeremy Compostella --- NEWS | 5 +++++ doc/coreutils.texi | 6 ++++++ src/split.c | 24 ++++++++++++++++++++++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 2b0926f..398405d 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,11 @@ GNU coreutils NEWS -*- outline -*- * Noteworthy changes in release ?.? (????-??-??) [?] +** New features + + split now accepts the new --suffix=SUFF option. When SUFF is + specified, SUFF is append to each output filenames right after the + dynamic suffix. * Noteworthy changes in release 8.15 (2012-01-06) [stable] diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 0d3b739..9ccadf5 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -3083,6 +3083,12 @@ and so can be a pipe for example. @opindex --suffix-length Use suffixes of length @var{length}. The default @var{length} is 2. +@itemx --suffix=@var{suff} +@opindex -a +@opindex --suffix-length +Append @var{suff} to each output filename right after the dynamic +suffix. @var{suff} must not contain slash. + @item -d @itemx --numeric-suffixes @opindex -d diff --git a/src/split.c b/src/split.c index 5fbce0e..fa7d30a 100644 --- a/src/split.c +++ b/src/split.c @@ -80,6 +80,13 @@ static size_t suffix_length; /* Alphabet of characters to use in suffix. */ static char const *suffix_alphabet = "abcdefghijklmnopqrstuvwxyz"; +/* Length of fixed suffix. */ +static size_t fixed_suffix_len = 0; + +/* Fixed suffix to append to OUTFILE right after the dynamic + suffix. */ +static char const *fixed_suffix; + /* Name of input file. May be "-". */ static char *infile; @@ -110,7 +117,8 @@ enum { VERBOSE_OPTION = CHAR_MAX + 1, FILTER_OPTION, - IO_BLKSIZE_OPTION + IO_BLKSIZE_OPTION, + SUFFIX_OPTION }; static struct option const longopts[] = @@ -122,6 +130,7 @@ static struct option const longopts[] = {"elide-empty-files", no_argument, NULL, 'e'}, {"unbuffered", no_argument, NULL, 'u'}, {"suffix-length", required_argument, NULL, 'a'}, + {"suffix", required_argument, NULL, SUFFIX_OPTION}, {"numeric-suffixes", no_argument, NULL, 'd'}, {"filter", required_argument, NULL, FILTER_OPTION}, {"verbose", no_argument, NULL, VERBOSE_OPTION}, @@ -193,6 +202,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ "), stdout); fprintf (stdout, _("\ -a, --suffix-length=N use suffixes of length N (default %d)\n\ + --suffix=SUFF append SUFF to each output filename right after\n\ + the dynamic suffix. SUFF must not contain slash\n\ -b, --bytes=SIZE put SIZE bytes per output file\n\ -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file\n\ -d, --numeric-suffixes use numeric suffixes instead of alphabetic\n\ @@ -237,13 +248,15 @@ next_file_name (void) /* Allocate and initialize the first file name. */ size_t outbase_length = strlen (outbase); - size_t outfile_length = outbase_length + suffix_length; + size_t outfile_length = outbase_length + suffix_length + fixed_suffix_len; if (outfile_length + 1 < outbase_length) xalloc_die (); outfile = xmalloc (outfile_length + 1); outfile_mid = outfile + outbase_length; memcpy (outfile, outbase, outbase_length); memset (outfile_mid, suffix_alphabet[0], suffix_length); + if (fixed_suffix_len) + memcpy (outfile_mid + suffix_length, fixed_suffix, fixed_suffix_len); outfile[outfile_length] = 0; sufindex = xcalloc (suffix_length, sizeof *sufindex); @@ -1036,6 +1049,13 @@ main (int argc, char **argv) } break; + case SUFFIX_OPTION: + { + fixed_suffix = optarg; + fixed_suffix_len = strlen (fixed_suffix); + } + break; + case 'b': if (split_type != type_undef) FAIL_ONLY_ONE_WAY (); -- 1.7.2.5 --=-=-=-- From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sun, 29 Jan 2012 00:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Cc: 6554@debbugs.gnu.org, Eric Blake , coreutils@gnu.org, Peng Yu Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.132779609316229 (code B ref 6554); Sun, 29 Jan 2012 00:15:02 +0000 Received: (at 6554) by debbugs.gnu.org; 29 Jan 2012 00:14:53 +0000 Received: from localhost ([127.0.0.1]:42604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrIQ0-0004Di-PN for submit@debbugs.gnu.org; Sat, 28 Jan 2012 19:14:53 -0500 Received: from mail3.vodafone.ie ([213.233.128.45]:7877) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrIPx-0004DT-F3 for 6554@debbugs.gnu.org; Sat, 28 Jan 2012 19:14:51 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsgBAC2OJE9tTehq/2dsb2JhbAAMNoQ5UqxEAQEBAwEBAgkXDwFGBQsJAg0LAgIFFgsCAgkDAgECARYvBg0BBwEBFodiCacykHmBL4cNAQUDBQYBAw4GCQoKgxQdDBIPYgmCVoEWBJJziB+MWQ Received: from unknown (HELO [192.168.1.79]) ([109.77.232.106]) by mail3.vodafone.ie with ESMTP; 29 Jan 2012 00:14:41 +0000 Message-ID: <4F248F70.2080205@draigBrady.com> Date: Sun, 29 Jan 2012 00:14:40 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 References: <4C2E4350.9030807@redhat.com> <87vcnvcrco.fsf@Apollo.jerryland.fr> In-Reply-To: <87vcnvcrco.fsf@Apollo.jerryland.fr> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 01/28/2012 11:57 PM, Jérémy Compostella wrote: > Pádraig Brady wrotes: >> Thanks a lot for working on this. > >> Could you give a real world example where >> you find this useful, just for the record. > It's useful in some cases where the chunk files type is known. As for > example, when I split a file which is a concatenation of several bitmap > files of the same size. Automatically append the appropriate suffix > "type" is time saving and comfortable. Another example is when the split > does not alter the file "type" as in the example you provided below, > input and output files are "txt" files. Having the appropriate suffix > automatically appended to the chunk file names make these files easily > available to applications which care about the file suffix. Right, thanks for the clarification. >> I should note that --suffix is incompatible >> with a variable length generated suffix. >> I.E. one that would allow for arbitrary sized input: >> http://lists.gnu.org/archive/html/bug-coreutils/2009-09/msg00220.html >> Though I guess that functionality could still be >> provided if required, by specifying --suffix-length=auto >> and having that mutually exclusive with --suffix. > First, after having carefully read the thread you are talking about I > did not find any implementation of this in the current coreutils > repository. Anyway, this feature is interesting and I would be glad to > implement it if needs too but in another commit. Yes, this feature was removed from coreutils. Anyway something to worry about later. > Second, I don't get your point. Why it should not be possible to append > a fixed length suffix to output files with a variable length dynamic > suffix ? I do not figure out why it's incompatible. What do I > misunderstood ? To allow processing the split files in order. If the supplied suffix is overlapping part of a generated suffix, then there is no way to subsequently sort the parts. > For example, the following hypothetical split command call looks > perfectly compatible: > $ split -b10 --suffix-length=auto --suffix=.txt file.txt file. > $ ls > file.aa.txt > [...] > file.yz.txt > file.zaaa.txt This example is usually OK as '.' will sort before letters. If one has a --suffix without a '.' though, then we've problems. This is just an edge case worth noting. >> As for the patch, it seems to work :) >> >> t$ seq 10 > file.txt >> t$ ../split -n10 --suffix=.txt file.txt file. >> t$ l >> -rw-rw-r--. 1 padraig 21 Jan 28 14:06 file.txt >> -rw-rw-r--. 1 padraig 3 Jan 28 14:06 file.aj.txt >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ai.txt >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ah.txt >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ag.txt >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.af.txt >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ae.txt >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ad.txt >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ac.txt >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ab.txt >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.aa.txt > >> We'd need some corresponding documentation in doc/coreutils.texi, >> and an entry in NEWS. > I added the corresponding documentation in both of files. I've done my > best but feel free to comment my additions. > >> Also even thought the patch is small, you'd need to start >> the copyright assignment process for a new parameter to `split`. > I filled out and sent my coreutils assignment form. Excellent thanks. Pádraig. From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) References: <4C2E4350.9030807@redhat.com> In-Reply-To: <4C2E4350.9030807@redhat.com> Resent-From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sun, 29 Jan 2012 12:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 6554@debbugs.gnu.org, Eric Blake , coreutils@gnu.org, Peng Yu Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.132783998414532 (code B ref 6554); Sun, 29 Jan 2012 12:27:01 +0000 Received: (at 6554) by debbugs.gnu.org; 29 Jan 2012 12:26:24 +0000 Received: from localhost ([127.0.0.1]:43086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrTpw-0003mK-6H for submit@debbugs.gnu.org; Sun, 29 Jan 2012 07:26:24 -0500 Received: from mail-we0-f172.google.com ([74.125.82.172]:52858) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrTps-0003m6-3I for 6554@debbugs.gnu.org; Sun, 29 Jan 2012 07:26:21 -0500 Received: by werm10 with SMTP id m10so2464926wer.3 for <6554@debbugs.gnu.org>; Sun, 29 Jan 2012 04:26:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:cc:date:message-id:mime-version:content-type :content-transfer-encoding; bh=2tQ3bXB9RO7yo2mE/Sper6tpNNyAU0H0HqvXnT4Iqas=; b=X8iDkkdi5Gh/O6Ia8BaZG04Orr5FsTmFoD9rvET6HGne2ceS0n/4ilIKji0BUPSehS qqAWItP4P2m3Z9+ifxe9Nu93BH79ymYOnxDz/LeD9amQ+P6d1wbCMGf1Obu9n3I6Ct+C 4CR+sbTYyFo3WAF9S5x58qcPmBfUzvPxFy1cY= Received: by 10.216.136.155 with SMTP id w27mr6993093wei.8.1327839970419; Sun, 29 Jan 2012 04:26:10 -0800 (PST) Received: from Apollo.jerryland.fr ([85.69.251.50]) by mx.google.com with ESMTPS id m8sm42020320wia.11.2012.01.29.04.26.08 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 29 Jan 2012 04:26:09 -0800 (PST) From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Date: Sun, 29 Jan 2012 13:26:28 +0100 Message-ID: <87sjiyd79n.fsf@Apollo.jerryland.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 01/28/2012 00:00 AM, P=C3=A1draig Brady wrote: > On 01/28/2012 11:57 PM, J=C3=A9r=C3=A9my Compostella wrote: [...] > >> I should note that --suffix is incompatible > >> with a variable length generated suffix. > >> I.E. one that would allow for arbitrary sized input: > >> http://lists.gnu.org/archive/html/bug-coreutils/2009-09/msg00220.html > >> Though I guess that functionality could still be > >> provided if required, by specifying --suffix-length=3Dauto > >> and having that mutually exclusive with --suffix. > > First, after having carefully read the thread you are talking about I > > did not find any implementation of this in the current coreutils > > repository. Anyway, this feature is interesting and I would be glad to > > implement it if needs too but in another commit. >=20 > Yes, this feature was removed from coreutils. > Anyway something to worry about later. >=20 > > Second, I don't get your point. Why it should not be possible to append > > a fixed length suffix to output files with a variable length dynamic > > suffix ? I do not figure out why it's incompatible. What do I > > misunderstood ? >=20 > To allow processing the split files in order. > If the supplied suffix is overlapping part of a generated suffix, > then there is no way to subsequently sort the parts. >=20 > > For example, the following hypothetical split command call looks > > perfectly compatible: > > $ split -b10 --suffix-length=3Dauto --suffix=3D.txt file.txt file. > > $ ls > > file.aa.txt > > [...] > > file.yz.txt > > file.zaaa.txt >=20 > This example is usually OK as '.' will sort before letters. > If one has a --suffix without a '.' though, then we've problems. > This is just an edge case worth noting. Thanks, I get it now. IMHO these options should not be mutual exclusives but the documentation should mention the variable length dynamic suffix algorithm and warn about this behavior. In that case the user will be able to have the precise behavior he wants without a systematic constraint. > >> As for the patch, it seems to work :) > >> > >> t$ seq 10 > file.txt > >> t$ ../split -n10 --suffix=3D.txt file.txt file. > >> t$ l > >> -rw-rw-r--. 1 padraig 21 Jan 28 14:06 file.txt > >> -rw-rw-r--. 1 padraig 3 Jan 28 14:06 file.aj.txt > >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ai.txt > >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ah.txt > >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ag.txt > >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.af.txt > >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ae.txt > >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ad.txt > >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ac.txt > >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.ab.txt > >> -rw-rw-r--. 1 padraig 2 Jan 28 14:06 file.aa.txt > >=20 > >> We'd need some corresponding documentation in doc/coreutils.texi, > >> and an entry in NEWS. > > I added the corresponding documentation in both of files. I've done my > > best but feel free to comment my additions. > >=20 > >> Also even thought the patch is small, you'd need to start > >> the copyright assignment process for a new parameter to `split`. > > I filled out and sent my coreutils assignment form. >=20 > Excellent thanks. Jeremy From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) References: <4C2E4350.9030807@redhat.com> In-Reply-To: <4C2E4350.9030807@redhat.com> Resent-From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 06 Feb 2012 13:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 6554@debbugs.gnu.org, Eric Blake , coreutils@gnu.org, Peng Yu Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.13285365799174 (code B ref 6554); Mon, 06 Feb 2012 13:57:01 +0000 Received: (at 6554) by debbugs.gnu.org; 6 Feb 2012 13:56:19 +0000 Received: from localhost ([127.0.0.1]:56514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuP3F-0002Np-Qt for submit@debbugs.gnu.org; Mon, 06 Feb 2012 08:56:18 -0500 Received: from mail-ww0-f42.google.com ([74.125.82.42]:64980) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuP35-0002NI-1V for 6554@debbugs.gnu.org; Mon, 06 Feb 2012 08:56:09 -0500 Received: by wgbgn7 with SMTP id gn7so3182610wgb.3 for <6554@debbugs.gnu.org>; Mon, 06 Feb 2012 05:55:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:cc:date:message-id:mime-version:content-type; bh=IenkGplFdwurVG1qqxYfbFvexUVqWZpG3t9DAD+Fmdc=; b=TtfpxcoNMbmLY9VZlD/0HB5vQMpAGFET26qDyoM85bARxrQ4bkk1BoORFupUHIH6DA hHUWjXk40zOm7Yak1/iOg1enVtMVwfAk+qGIaDvimTl0chzqcIXuUYUsvoI2UYGIOzCn 7gWIlMnMEaOkwI0sWs8BnpPdlvagIOnJY0xUg= Received: by 10.180.79.229 with SMTP id m5mr4126180wix.6.1328536506852; Mon, 06 Feb 2012 05:55:06 -0800 (PST) Received: from Apollo.jerryland.fr ([85.69.251.50]) by mx.google.com with ESMTPS id s8sm16693111wiz.8.2012.02.06.05.55.04 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Feb 2012 05:55:05 -0800 (PST) From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Date: Mon, 06 Feb 2012 14:55:24 +0100 Message-ID: <87y5sg3w37.fsf@Apollo.jerryland.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable P=C3=A1draig, all, I took into account general comments on my commits. I attached the improved patch for feature. Improvements are: - Add by file description, - I put back accents on my name (J=C3=A9r=C3=A9my instead of Jeremy), - I referenced from who this feature was requested. Cheers, J=C3=A9r=C3=A9my --- --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-split-Additional-suffix-for-split-bug-6554.patch Content-Description: split: Additional suffix for split (bug#6554) patch >From 81e12245be60ef4e9b06ab18fa9e92bce81ea63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Compostella?= Date: Fri, 27 Jan 2012 18:14:34 +0100 Subject: [PATCH] split: Additional suffix for split (bug#6554) Add support to an additionnal suffix with the new `--suffix=SUFF' option. SUFF is appended to each output filename right after the dynamic suffix. * src/split.c (next_file_name): Append fixed_suffix to outfile. (main): Handle --suffix new option. * NEWS (New features): Mention it. * doc/coreutils.texi (split invocation): Mention it. * tests/split/suffix: New file. --suffix option tests. * tests/Makefile.am (TESTS): Add it. Requested by Peng Yu. --- NEWS | 6 ++++++ doc/coreutils.texi | 6 ++++++ src/split.c | 24 ++++++++++++++++++++++-- tests/Makefile.am | 1 + tests/split/suffix | 41 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 76 insertions(+), 2 deletions(-) create mode 100755 tests/split/suffix diff --git a/NEWS b/NEWS index 9eebbf6..fa056e1 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,12 @@ GNU coreutils NEWS -*- outline -*- * Noteworthy changes in release ?.? (????-??-??) [?] +** New features + + split now accepts the new --suffix=SUFF option. When SUFF is + specified, SUFF is append to each output filenames right after the + dynamic suffix. + ** Bug fixes mv now lets you move a symlink onto a same-inode destination file that diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 52838e7..db12dbb 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -3083,6 +3083,12 @@ and so can be a pipe for example. @opindex --suffix-length Use suffixes of length @var{length}. The default @var{length} is 2. +@itemx --suffix=@var{suff} +@opindex -a +@opindex --suffix-length +Append @var{suff} to each output filename right after the dynamic +suffix. @var{suff} must not contain slash. + @item -d @itemx --numeric-suffixes @opindex -d diff --git a/src/split.c b/src/split.c index 1d0310c..af532fa 100644 --- a/src/split.c +++ b/src/split.c @@ -80,6 +80,13 @@ static size_t suffix_length; /* Alphabet of characters to use in suffix. */ static char const *suffix_alphabet = "abcdefghijklmnopqrstuvwxyz"; +/* Length of fixed suffix. */ +static size_t fixed_suffix_len = 0; + +/* Fixed suffix to append to OUTFILE right after the dynamic + suffix. */ +static char const *fixed_suffix; + /* Name of input file. May be "-". */ static char *infile; @@ -110,7 +117,8 @@ enum { VERBOSE_OPTION = CHAR_MAX + 1, FILTER_OPTION, - IO_BLKSIZE_OPTION + IO_BLKSIZE_OPTION, + SUFFIX_OPTION }; static struct option const longopts[] = @@ -122,6 +130,7 @@ static struct option const longopts[] = {"elide-empty-files", no_argument, NULL, 'e'}, {"unbuffered", no_argument, NULL, 'u'}, {"suffix-length", required_argument, NULL, 'a'}, + {"suffix", required_argument, NULL, SUFFIX_OPTION}, {"numeric-suffixes", no_argument, NULL, 'd'}, {"filter", required_argument, NULL, FILTER_OPTION}, {"verbose", no_argument, NULL, VERBOSE_OPTION}, @@ -193,6 +202,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ "), stdout); fprintf (stdout, _("\ -a, --suffix-length=N use suffixes of length N (default %d)\n\ + --suffix=SUFF append SUFF to each output filename right after\n\ + the dynamic suffix. SUFF must not contain slash\n\ -b, --bytes=SIZE put SIZE bytes per output file\n\ -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file\n\ -d, --numeric-suffixes use numeric suffixes instead of alphabetic\n\ @@ -237,13 +248,15 @@ next_file_name (void) /* Allocate and initialize the first file name. */ size_t outbase_length = strlen (outbase); - size_t outfile_length = outbase_length + suffix_length; + size_t outfile_length = outbase_length + suffix_length + fixed_suffix_len; if (outfile_length + 1 < outbase_length) xalloc_die (); outfile = xmalloc (outfile_length + 1); outfile_mid = outfile + outbase_length; memcpy (outfile, outbase, outbase_length); memset (outfile_mid, suffix_alphabet[0], suffix_length); + if (fixed_suffix_len) + memcpy (outfile_mid + suffix_length, fixed_suffix, fixed_suffix_len); outfile[outfile_length] = 0; sufindex = xcalloc (suffix_length, sizeof *sufindex); @@ -1036,6 +1049,13 @@ main (int argc, char **argv) } break; + case SUFFIX_OPTION: + { + fixed_suffix = optarg; + fixed_suffix_len = strlen (fixed_suffix); + } + break; + case 'b': if (split_type != type_undef) FAIL_ONLY_ONE_WAY (); diff --git a/tests/Makefile.am b/tests/Makefile.am index a94aaa2..28a7ef6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -254,6 +254,7 @@ TESTS = \ misc/sort-NaN-infloop \ split/filter \ split/suffix-length \ + split/suffix \ split/b-chunk \ split/fail \ split/lines \ diff --git a/tests/split/suffix b/tests/split/suffix new file mode 100755 index 0000000..8282359 --- /dev/null +++ b/tests/split/suffix @@ -0,0 +1,41 @@ +#!/bin/sh +# show that 'split --suffix=SUFF' works. + +# Copyright (C) 2012 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. "${srcdir=.}/init.sh"; path_prepend_ ../src +print_ver_ split + +printf '1\n2\n3\n4\n5\n' > in || framework_failure_ + +split --lines=2 --suffix=.txt in > out || fail=1 +cat <<\EOF > exp-1 +1 +2 +EOF +cat <<\EOF > exp-2 +3 +4 +EOF +cat <<\EOF > exp-3 +5 +EOF + +compare exp-1 xaa.txt || fail=1 +compare exp-2 xab.txt || fail=1 +compare exp-3 xac.txt || fail=1 + +Exit $fail -- 1.7.2.5 --=-=-=-- From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) Resent-From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 18 Feb 2012 12:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 6554@debbugs.gnu.org, Eric Blake , coreutils@gnu.org, Peng Yu Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.132956970518167 (code B ref 6554); Sat, 18 Feb 2012 12:56:02 +0000 Received: (at 6554) by debbugs.gnu.org; 18 Feb 2012 12:55:05 +0000 Received: from localhost ([127.0.0.1]:44508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ryjof-0004iy-1w for submit@debbugs.gnu.org; Sat, 18 Feb 2012 07:55:05 -0500 Received: from mail-iy0-f172.google.com ([209.85.210.172]:37740) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ryjob-0004iS-8t for 6554@debbugs.gnu.org; Sat, 18 Feb 2012 07:55:03 -0500 Received: by iagf6 with SMTP id f6so5642122iag.3 for <6554@debbugs.gnu.org>; Sat, 18 Feb 2012 04:52:56 -0800 (PST) Received-SPF: pass (google.com: domain of jeremy.compostella@gmail.com designates 10.50.153.198 as permitted sender) client-ip=10.50.153.198; Authentication-Results: mr.google.com; spf=pass (google.com: domain of jeremy.compostella@gmail.com designates 10.50.153.198 as permitted sender) smtp.mail=jeremy.compostella@gmail.com; dkim=pass header.i=jeremy.compostella@gmail.com Received: from mr.google.com ([10.50.153.198]) by 10.50.153.198 with SMTP id vi6mr2524857igb.30.1329569576625 (num_hops = 1); Sat, 18 Feb 2012 04:52:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=ZWefN1M6RavwGq/ffKaBoFUuhWLFLqGzg79QzyVPPlY=; b=BPn2vDPfcLHETtQ5XScl3AkEwGrvCszXwcBZR1tNfPVmoendBgBTRRJI5ExMklwM0c VYFpJxqAFIjlkj5DUrfC0ls191kqYB0nV8AJE9c73mnLzsYlDYV1TbTqpOoxmy4uqKWj uhUCoC4Ttr/hJrIsoGzTkHwmj1kNPlwqvIRi0= Received: by 10.50.153.198 with SMTP id vi6mr2041883igb.30.1329569576584; Sat, 18 Feb 2012 04:52:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.29.196 with HTTP; Sat, 18 Feb 2012 04:52:35 -0800 (PST) In-Reply-To: <87sjiyd79n.fsf@Apollo.jerryland.fr> References: <87sjiyd79n.fsf@Apollo.jerryland.fr> From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Date: Sat, 18 Feb 2012 13:52:35 +0100 Message-ID: Content-Type: multipart/alternative; boundary=e89a8f22c68151050904b93c8ac7 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --e89a8f22c68151050904b93c8ac7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable All, I'm continuing with this feature implementation. Getting advantage on my newly acquired experience on this project I made some changes in my implementation. Now I have a concern about the option name "--suffix". I think the --suffix-length, --numeric-suffixes and the new --suffix are confusing for the user since the two first are related to the count suffix and the last one is an additional suffix appended to the whole output file name. I think it would be clearer to replace "--suffix" with something like "--additional-suffix". What do you think ? Cheers, J=E9r=E9my --e89a8f22c68151050904b93c8ac7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
All,

I'm continuing with this feature imp= lementation. Getting advantage on my
newly acquired experience on= this project I made some changes in my
implementation.

Now I have a concern about the option name "--suffix&qu= ot;. I think the
--suffix-length, --numeric-suffixes and the new = --suffix are confusing
for the user since the two first are relat= ed to the count suffix and the
last one is an additional suffix appended to the whole output file
name. I think it would be clearer to replace "--suffix" wi= th something
like "--additional-suffix". What do you th= ink ?

Cheers,

J=E9r=E9my
--e89a8f22c68151050904b93c8ac7-- From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 18 Feb 2012 14:27:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Cc: 6554@debbugs.gnu.org, Eric Blake , coreutils@gnu.org, Peng Yu Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.132957521926106 (code B ref 6554); Sat, 18 Feb 2012 14:27:03 +0000 Received: (at 6554) by debbugs.gnu.org; 18 Feb 2012 14:26:59 +0000 Received: from localhost ([127.0.0.1]:44565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RylFa-0006n1-Ga for submit@debbugs.gnu.org; Sat, 18 Feb 2012 09:26:58 -0500 Received: from mail3.vodafone.ie ([213.233.128.45]:3710) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RylFV-0006mk-5k for 6554@debbugs.gnu.org; Sat, 18 Feb 2012 09:26:54 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAFG0P09tTdvu/2dsb2JhbAAMNq9KhV0BAQEEDCYBRhALDQsJFg8JAwIBAgFFBg0BBwEBvX+MKAMCAQ4JAwIDBwQEAgIDCQEQA4cxBJs2jG4 Received: from unknown (HELO [192.168.1.79]) ([109.77.219.238]) by mail3.vodafone.ie with ESMTP; 18 Feb 2012 14:24:41 +0000 Message-ID: <4F3FB4A9.8080302@draigBrady.com> Date: Sat, 18 Feb 2012 14:24:41 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 References: <87sjiyd79n.fsf@Apollo.jerryland.fr> In-Reply-To: X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 02/18/2012 12:52 PM, Jérémy Compostella wrote: > All, > > I'm continuing with this feature implementation. Getting advantage on my > newly acquired experience on this project I made some changes in my > implementation. > > Now I have a concern about the option name "--suffix". I think the > --suffix-length, --numeric-suffixes and the new --suffix are confusing > for the user since the two first are related to the count suffix and the > last one is an additional suffix appended to the whole output file > name. I think it would be clearer to replace "--suffix" with something > like "--additional-suffix". What do you think ? That's a good point. --additional-suffix is better. Note csplit has a more general --suffix-format option (which can be shortened to --suffix). So one can do: --suffix="%02d.txt". However that's only possible, because csplit supports only numeric suffixes. However, this is starting to make me think this marginal feature isn't worth it. For the record, summarising the disadvantages so far: Backwards incompat with other systems (including older coreutils). Some complexity in understanding/describing various suffix options. Interoperability issue with possible future auto suffix len feature. cheers, Pádraig. From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) Resent-From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 18 Feb 2012 14:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 6554@debbugs.gnu.org, Eric Blake , coreutils@gnu.org, Peng Yu Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.132957683728433 (code B ref 6554); Sat, 18 Feb 2012 14:54:01 +0000 Received: (at 6554) by debbugs.gnu.org; 18 Feb 2012 14:53:57 +0000 Received: from localhost ([127.0.0.1]:44584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rylfg-0007OX-4y for submit@debbugs.gnu.org; Sat, 18 Feb 2012 09:53:56 -0500 Received: from mail-iy0-f172.google.com ([209.85.210.172]:45134) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rylfd-0007OK-HA for 6554@debbugs.gnu.org; Sat, 18 Feb 2012 09:53:54 -0500 Received: by iagf6 with SMTP id f6so5733627iag.3 for <6554@debbugs.gnu.org>; Sat, 18 Feb 2012 06:51:48 -0800 (PST) Received-SPF: pass (google.com: domain of jeremy.compostella@gmail.com designates 10.50.89.196 as permitted sender) client-ip=10.50.89.196; Authentication-Results: mr.google.com; spf=pass (google.com: domain of jeremy.compostella@gmail.com designates 10.50.89.196 as permitted sender) smtp.mail=jeremy.compostella@gmail.com; dkim=pass header.i=jeremy.compostella@gmail.com Received: from mr.google.com ([10.50.89.196]) by 10.50.89.196 with SMTP id bq4mr3062903igb.26.1329576708300 (num_hops = 1); Sat, 18 Feb 2012 06:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=V8kNIn6/zpKFo03Ql4oYFj+PTWONRaPLYslQ1d5nTvQ=; b=EwgUh3pc/NDbBSbqbxAkZd6l0x2caaTmfS3wyiiayB2sv2pS85YOaJWC8QzooCtrOg GPaJLCyyIvAnLqPhBgDcA6cZRwTsyfZ/x+JDyrB6gRHLn+xCfKeFFloz2xG8eJ7JQCFO 5kd1SDtYKuEyDqveH9dSN/rbCl3WCaOw/Rgdw= Received: by 10.50.89.196 with SMTP id bq4mr2476328igb.26.1329576708264; Sat, 18 Feb 2012 06:51:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.29.196 with HTTP; Sat, 18 Feb 2012 06:51:28 -0800 (PST) In-Reply-To: <4F3FB4A9.8080302@draigBrady.com> References: <87sjiyd79n.fsf@Apollo.jerryland.fr> <4F3FB4A9.8080302@draigBrady.com> From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Date: Sat, 18 Feb 2012 15:51:28 +0100 Message-ID: Content-Type: multipart/alternative; boundary=e89a8f3ba68165d23004b93e333c X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --e89a8f3ba68165d23004b93e333c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > That's a good point. --additional-suffix is better. > > Note csplit has a more general --suffix-format option > (which can be shortened to --suffix). > So one can do: --suffix=3D"%02d.txt". > However that's only possible, because csplit > supports only numeric suffixes. > > However, this is starting to make me think > this marginal feature isn't worth it. > For the record, summarising the disadvantages so far: > > Backwards incompat with other systems (including older coreutils). > Some complexity in understanding/describing various suffix options. With the new "--additional-suffix" it looks clear to me. > Interoperability issue with possible future auto suffix len feature. If I remember well the issue is related with the alphabetic file order. This issue could be easily handled by the user. IMHO, this feature is maybe marginal but it is very convenient to have it. Anyway, it would be great to state on it as I need to know if I should let it go or not. It's always hard to trash work but that's the game ! :) Cheers, J=E9r=E9my --e89a8f3ba68165d23004b93e333c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
> That's a good point. --additional-suffix is better.
>=A0
> Note csplit has a more general --suffix-format opti= on
> (which can be shortened to --suffix).
> So o= ne can do: --suffix=3D"%02d.txt".
> However that's only possible, because csplit
> s= upports only numeric suffixes.
>=A0
> However, th= is is starting to make me think
> this marginal feature isn= 9;t worth it.
> For the record, summarising the disadvantages so far:
&= gt;=A0
> =A0Backwards incompat with other systems (including o= lder coreutils).
> =A0Some complexity in understanding/describ= ing various suffix options.
With the new "--additional-suffix" it looks clear to me.
> =A0Interoperability issue with possible future auto suffix len = feature.
If I remember well the issue is related with the alphabe= tic file
order. This issue could be easily handled by the user.

<= /div>
IMHO, this feature is maybe marginal but it is very convenient to= have
it. Anyway, it would be great to state on it as I need to k= now if I
should let it go or not. It's always hard to trash work but that&#= 39;s the
game ! :)

Cheers,
J=E9r=E9my
--e89a8f3ba68165d23004b93e333c-- From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 18 Feb 2012 15:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Cc: 6554@debbugs.gnu.org, Eric Blake , coreutils@gnu.org, Peng Yu Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.132957718029132 (code B ref 6554); Sat, 18 Feb 2012 15:00:02 +0000 Received: (at 6554) by debbugs.gnu.org; 18 Feb 2012 14:59:40 +0000 Received: from localhost ([127.0.0.1]:44845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RyllD-0007Zp-FP for submit@debbugs.gnu.org; Sat, 18 Feb 2012 09:59:40 -0500 Received: from mail3.vodafone.ie ([213.233.128.45]:23257) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RyllB-0007Zd-A5 for 6554@debbugs.gnu.org; Sat, 18 Feb 2012 09:59:38 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAGS7P09tTdvu/2dsb2JhbAAMOK9EhVsBAQEEDCYBRhALDQsJFg8JAwIBAgFFBg0BBwEBwQiMChoJAQ4JAwIDBwQEAgIDCQEQA4cxBJs2jG4 Received: from unknown (HELO [192.168.1.79]) ([109.77.219.238]) by mail3.vodafone.ie with ESMTP; 18 Feb 2012 14:57:31 +0000 Message-ID: <4F3FBC5B.3010202@draigBrady.com> Date: Sat, 18 Feb 2012 14:57:31 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 References: <87sjiyd79n.fsf@Apollo.jerryland.fr> <4F3FB4A9.8080302@draigBrady.com> In-Reply-To: X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 02/18/2012 02:51 PM, Jérémy Compostella wrote: >> That's a good point. --additional-suffix is better. >> >> Note csplit has a more general --suffix-format option >> (which can be shortened to --suffix). >> So one can do: --suffix="%02d.txt". >> However that's only possible, because csplit >> supports only numeric suffixes. >> >> However, this is starting to make me think >> this marginal feature isn't worth it. >> For the record, summarising the disadvantages so far: >> >> Backwards incompat with other systems (including older coreutils). >> Some complexity in understanding/describing various suffix options. > With the new "--additional-suffix" it looks clear to me. >> Interoperability issue with possible future auto suffix len feature. > If I remember well the issue is related with the alphabetic file > order. This issue could be easily handled by the user. > > IMHO, this feature is maybe marginal but it is very convenient to have > it. Anyway, it would be great to state on it as I need to know if I > should let it go or not. It's always hard to trash work but that's the > game ! :) Sure, please go ahead since you've done most of the work, and others have expressed a desire for this. I'm just stating the disadvantages for the record, and perhaps a prompt to others to voice any reservations they may have. We always have to be wary when adding new stuff. cheers, Pádraig. From unknown Thu Jun 19 14:04:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) Resent-From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sun, 19 Feb 2012 12:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6554 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 6554@debbugs.gnu.org, Eric Blake , coreutils@gnu.org, Peng Yu Received: via spool by 6554-submit@debbugs.gnu.org id=B6554.13296562252543 (code B ref 6554); Sun, 19 Feb 2012 12:58:01 +0000 Received: (at 6554) by debbugs.gnu.org; 19 Feb 2012 12:57:05 +0000 Received: from localhost ([127.0.0.1]:45333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rz6K8-0000ey-Ks for submit@debbugs.gnu.org; Sun, 19 Feb 2012 07:57:05 -0500 Received: from mail-iy0-f172.google.com ([209.85.210.172]:33593) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rz6K4-0000eT-Qk for 6554@debbugs.gnu.org; Sun, 19 Feb 2012 07:57:02 -0500 Received: by iagf6 with SMTP id f6so6475265iag.3 for <6554@debbugs.gnu.org>; Sun, 19 Feb 2012 04:54:50 -0800 (PST) Received-SPF: pass (google.com: domain of jeremy.compostella@gmail.com designates 10.50.89.232 as permitted sender) client-ip=10.50.89.232; Authentication-Results: mr.google.com; spf=pass (google.com: domain of jeremy.compostella@gmail.com designates 10.50.89.232 as permitted sender) smtp.mail=jeremy.compostella@gmail.com; dkim=pass header.i=jeremy.compostella@gmail.com Received: from mr.google.com ([10.50.89.232]) by 10.50.89.232 with SMTP id br8mr7095983igb.30.1329656090290 (num_hops = 1); Sun, 19 Feb 2012 04:54:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=REcsc84gtJlIXlnvEEw4pdJc0MsI3rr3iM5QfRpUe2g=; b=lyV2rFN4A5cUE2CZ1vqJQp7MEE3U3sSbWgdNqjWcKSy8G0+40xozzqxujuqieOnd/O lKQ3VdsoEPRZnl2wYyE0FqUrhnMdx1BS4mswYEX0MSyLSQW24GHh0xmBYT7x9BQ4oQmI tv4tHd79+IJwxHrZwUPnTvGR1bYDw5WBFXnoU= Received: by 10.50.89.232 with SMTP id br8mr5732998igb.30.1329656090259; Sun, 19 Feb 2012 04:54:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.29.196 with HTTP; Sun, 19 Feb 2012 04:54:30 -0800 (PST) In-Reply-To: <4F3FBC5B.3010202@draigBrady.com> References: <87sjiyd79n.fsf@Apollo.jerryland.fr> <4F3FB4A9.8080302@draigBrady.com> <4F3FBC5B.3010202@draigBrady.com> From: =?UTF-8?Q?J=C3=A9r=C3=A9my?= Compostella Date: Sun, 19 Feb 2012 13:54:30 +0100 Message-ID: Content-Type: multipart/mixed; boundary=e89a8f3ba429eef11004b950ae2c X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --e89a8f3ba429eef11004b950ae2c Content-Type: multipart/alternative; boundary=e89a8f3ba429eef10d04b950ae2a --e89a8f3ba429eef10d04b950ae2a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable P=E1draig, I replaced --suffix with --additional-suffix and made some cleaning. Feel free to comment the attached patch. Cheers, J=E9r=E9my --e89a8f3ba429eef10d04b950ae2a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
P=E1draig,

I replaced --suffix with --additio= nal-suffix and made some cleaning.

Feel free to co= mment the attached patch.

Cheers,

J=E9r=E9my
--e89a8f3ba429eef10d04b950ae2a-- --e89a8f3ba429eef11004b950ae2c Content-Type: text/x-patch; charset=US-ASCII; name="0001-split-additional-suffix-for-split-bug-6554.patch" Content-Disposition: attachment; filename="0001-split-additional-suffix-for-split-bug-6554.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gyu2vroy0 RnJvbSBiZDgwYWM4NzZjNjRmYTBmYWM0MDliMjQzMTFkMzBiZDQzZDM0ZGJkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/Sj1DMz1BOXI9QzM9QTlteT0yMENvbXBvc3Rl bGxhPz0gPGplcmVteS5jb21wb3N0ZWxsYUBnbWFpbC5jb20+CkRhdGU6IFN1biwgMTkgRmViIDIw MTIgMTM6NTI6NDcgKzAxMDAKU3ViamVjdDogW1BBVENIXSBzcGxpdDogYWRkaXRpb25hbCBzdWZm aXggZm9yIHNwbGl0IChidWcjNjU1NCkKCkFkZCB0aGUgLS1hZGRpdGlvbmFsLXN1ZmZpeCBvcHRp b24sIHRvIGFwcGVuZCBhbiBhZGRpdGlvbmFsIHN1ZmZpeCB0bwpvdXRwdXQgZmlsZSBuYW1lcy4K Ciogc3JjL3NwbGl0LmMgKG5leHRfZmlsZV9uYW1lKTogQXBwZW5kIGFkZGl0aW9ubmFsX3N1ZmZp eCB0byBvdXRwdXQKICBmaWxlIG5hbWVzLgoobWFpbik6IEhhbmRsZSBuZXcgLS1hZGRp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Y3B5IChvdXRmaWxlX21pZCArIHN1ZmZpeF9sZW5ndGgsIGFkZGl0aW9uYWxfc3Vm Zml4LCBhZGRzdWZfbGVuZ3RoKTsKICAgICAgIG91dGZpbGVbb3V0ZmlsZV9sZW5ndGhdID0gMDsK ICAgICAgIHN1ZmluZGV4ID0geGNhbGxvYyAoc3VmZml4X2xlbmd0aCwgc2l6ZW9mICpzdWZpbmRl eCk7CiAKQEAgLTEwNTIsNiArMTA2MywxNyBAQCBtYWluIChpbnQgYXJnYywgY2hhciAqKmFyZ3Yp CiAgICAgICAgICAgfQogICAgICAgICAgIGJyZWFrOwogCisgICAgICAgIGNhc2UgQURESVRJT05B TF9TVUZGSVhfT1BUSU9OOgorICAgICAgICAgIGlmIChsYXN0X2NvbXBvbmVudCAob3B0YXJnKSAh PSBvcHRhcmcpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGVycm9yICgwLCAwLAorICAg ICAgICAgICAgICAgICAgICAgXygiaW52YWxpZCBzdWZmaXggJXMsIGNvbnRhaW5zIGRpcmVjdG9y eSBzZXBhcmF0b3IiKSwKKyAgICAgICAgICAgICAgICAgICAgIHF1b3RlIChvcHRhcmcpKTsKKyAg ICAgICAgICAgICAgdXNhZ2UgKEVYSVRfRkFJTFVSRSk7CisgICAgICAgICAgICB9CisgICAgICAg ICAgYWRkaXRpb25hbF9zdWZmaXggPSBvcHRhcmc7CisgICAgICAgICAgYnJlYWs7CisKICAgICAg ICAgY2FzZSAnYic6CiAgICAgICAgICAgaWYgKHNwbGl0X3R5cGUgIT0gdHlwZV91bmRlZikKICAg ICAgICAgICAgIEZBSUxfT05MWV9PTkVfV0FZICgpOwpkaWZmIC0tZ2l0IGEvdGVzdHMvTWFrZWZp bGUuYW0gYi90ZXN0cy9NYWtlZmlsZS5hbQppbmRleCAyZmVlOTdkLi43NGZmNDcwIDEwMDY0NAot LS0gYS90ZXN0cy9NYWtlZmlsZS5hbQorKysgYi90ZXN0cy9NYWtlZmlsZS5hbQpAQCA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9uYWwtc3VmZml4PWEvYiBpbiAyPi9kZXYvbnVsbCA+IG91dCAmJiBmYWlsPTEKKworRXhp dCAkZmFpbAotLSAKMS43LjIuNQoK --e89a8f3ba429eef11004b950ae2c-- From unknown Thu Jun 19 14:04:38 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Eric Blake Subject: bug#6554: closed (Re: bug#6554: [PATCH] split: Additional suffix for split (bug#6554)) Message-ID: References: <4F413C74.1020104@draigBrady.com> <4C2E4350.9030807@redhat.com> X-Gnu-PR-Message: they-closed 6554 X-Gnu-PR-Package: coreutils Reply-To: 6554@debbugs.gnu.org Date: Sun, 19 Feb 2012 18:19:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1329675542-13260-1" This is a multi-part message in MIME format... ------------=_1329675542-13260-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #6554: [coreutils] Additional suffix for split which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 6554@debbugs.gnu.org. --=20 6554: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6554 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1329675542-13260-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 6554-done) by debbugs.gnu.org; 19 Feb 2012 18:18:36 +0000 Received: from localhost ([127.0.0.1]:46195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RzBLH-0003Q1-35 for submit@debbugs.gnu.org; Sun, 19 Feb 2012 13:18:35 -0500 Received: from mail3.vodafone.ie ([213.233.128.45]:49953) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RzBLF-0003PS-BZ for 6554-done@debbugs.gnu.org; Sun, 19 Feb 2012 13:18:34 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApgBAPE7QU9tTFkb/2dsb2JhbAAMNq9NhVoBAQEEDCYBRhALDQsJFg8JAwIBAgFFBg0BBwEBvT6MBikJBgIDBgMHAgkBCQMBAgKHWASbNoxu Received: from unknown (HELO [192.168.1.79]) ([109.76.89.27]) by mail3.vodafone.ie with ESMTP; 19 Feb 2012 18:16:20 +0000 Message-ID: <4F413C74.1020104@draigBrady.com> Date: Sun, 19 Feb 2012 18:16:20 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?J=E9r=E9my_Compostella?= Subject: Re: bug#6554: [PATCH] split: Additional suffix for split (bug#6554) References: <87sjiyd79n.fsf@Apollo.jerryland.fr> <4F3FB4A9.8080302@draigBrady.com> <4F3FBC5B.3010202@draigBrady.com> In-Reply-To: X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 6554-done Cc: Eric Blake , coreutils@gnu.org, 6554-done@debbugs.gnu.org, Peng Yu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 02/19/2012 12:54 PM, Jérémy Compostella wrote: > Pádraig, > > I replaced --suffix with --additional-suffix and made some cleaning. > > Feel free to comment the attached patch. Logic is perfect again. I adjusted the help output a little like: - -a, --suffix-length=N use suffixes of length N (default %d)\n\ - --additional-suffix=SUFFIX append an additional SUFFIX to output file\n\ - names. SUFFIX must not contain slash.\n\ + -a, --suffix-length=N generate suffixes of length N (default %d)\n\ + --additional-suffix=SUFFIX append an additional SUFFIX to file names.\n\ I'll push later on. cheers, Pádraig. ------------=_1329675542-13260-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Jul 2010 19:53:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUmIG-0007z2-Ah for submit@debbugs.gnu.org; Fri, 02 Jul 2010 15:53:00 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUmID-0007yx-NH for submit@debbugs.gnu.org; Fri, 02 Jul 2010 15:52:58 -0400 Received: from lists.gnu.org ([199.232.76.165]:37292) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OUmI9-0002sg-Cs for submit@debbugs.gnu.org; Fri, 02 Jul 2010 15:52:53 -0400 Received: from [140.186.70.92] (port=47009 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUmI7-0008GB-Tc for bug-coreutils@gnu.org; Fri, 02 Jul 2010 15:52:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUmI6-00038R-O1 for bug-coreutils@gnu.org; Fri, 02 Jul 2010 15:52:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52174) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUmI4-000386-D9; Fri, 02 Jul 2010 15:52:48 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o62JqkfD029878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 2 Jul 2010 15:52:46 -0400 Received: from [10.11.10.58] (vpn-10-58.rdu.redhat.com [10.11.10.58]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o62JqiWu002689; Fri, 2 Jul 2010 15:52:45 -0400 Message-ID: <4C2E4350.9030807@redhat.com> Date: Fri, 02 Jul 2010 13:51:44 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.2 Thunderbird/3.0.5 MIME-Version: 1.0 To: Peng Yu Subject: Re: [coreutils] Additional suffix for split References: In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig106BF392DACA3A2C9312EE51" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -7.8 (-------) X-Debbugs-Envelope-To: submit Cc: bug-coreutils , coreutils@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.7 (-------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig106BF392DACA3A2C9312EE51 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable [adding bug-coreutils, to create a bug id to track this by] On 06/15/2010 09:23 PM, Peng Yu wrote: > I need to add an additional common suffix to the files splited by > split. Right now, I have to use mv to do so. But I feel it is > convenient to have an option to add the suffix. Is this feature going > to be considered to be added in the future? Hmm, considering that we recently taught mktemp how to honor suffixes, it does indeed sound like this might be a useful feature addition. It's probably not going to be my highest priority to write such a patch, but I'll gladly review any patch written by someone else. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig106BF392DACA3A2C9312EE51 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJMLkNQAAoJEKeha0olJ0NqHaEH/iVmJkEAJrEfJbGzKe/ti9hc s7puDaS1cD43vjzOIxkQvDZ3XREOMPfgmbmiSqvlAOxXkPbt9jsbre6ZCCxZBpIX 49r4qYLmtZjsoo5KGHXCJVtOSs8CTcempy0Ji0rYKJSyyzrmtVY0TUFze6h7+QwU ZJqWQ/6GhNHkXqQ0ODcB+5LTnEoIRJpQ9H/ofiBDj7ZSCNDQHBvkOqs6PoC3I9K1 bYGMmzjSJCm1vl6JRtOdCD+DKw6Vdb/85uob7E+rGnILkBEZjN1FgjtIKEcARzPW I45XMn+cWkg+7ErYky3moTMZgsn1LgORcAgGpczobP8+DXZiR+Ge0jHTAHYcxfk= =WSig -----END PGP SIGNATURE----- --------------enig106BF392DACA3A2C9312EE51-- ------------=_1329675542-13260-1--