From unknown Sat Jun 21 10:45:09 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#8070 <8070@debbugs.gnu.org> To: bug#8070 <8070@debbugs.gnu.org> Subject: Status: cut command Reply-To: bug#8070 <8070@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:45:09 +0000 retitle 8070 cut command reassign 8070 coreutils submitter 8070 George Gallen severity 8070 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 17 17:15:59 2011 Received: (at submit) by debbugs.gnu.org; 17 Feb 2011 22:15:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqC8k-00008d-0Z for submit@debbugs.gnu.org; Thu, 17 Feb 2011 17:15:58 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqC3p-0008Sg-7l for submit@debbugs.gnu.org; Thu, 17 Feb 2011 17:10:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqCCc-0004YL-Ql for submit@debbugs.gnu.org; Thu, 17 Feb 2011 17:19:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:33950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqCCc-0004Y8-O7 for submit@debbugs.gnu.org; Thu, 17 Feb 2011 17:19:58 -0500 Received: from [140.186.70.92] (port=60872 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqCCb-0001c2-FF for bug-coreutils@gnu.org; Thu, 17 Feb 2011 17:19:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqCCZ-0004XP-Uc for bug-coreutils@gnu.org; Thu, 17 Feb 2011 17:19:57 -0500 Received: from smtp113.dfw.emailsrvr.com ([67.192.241.113]:47752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqCCZ-0004X5-PV for bug-coreutils@gnu.org; Thu, 17 Feb 2011 17:19:55 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp21.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id E4DCF2404A9 for ; Thu, 17 Feb 2011 17:19:54 -0500 (EST) X-Virus-Scanned: OK Received: from smtp192.mex07a.mlsrvr.com (smtp192.mex07a.mlsrvr.com [67.192.133.192]) by smtp21.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTPS id D44AD240481 for ; Thu, 17 Feb 2011 17:19:54 -0500 (EST) Received: from 34093-MBX-C06.mex07a.mlsrvr.com ([192.168.1.77]) by 152340-HUB02.mex07a.mlsrvr.com ([192.168.1.196]) with mapi; Thu, 17 Feb 2011 16:19:54 -0600 From: George Gallen To: "bug-coreutils@gnu.org" Date: Thu, 17 Feb 2011 16:19:53 -0600 Subject: cut command Thread-Topic: cut command Thread-Index: AcvO8Mxxbu5EO3tjSYaTdtxlusR/yg== Message-ID: <6D57EF06D84B5541AF530227504BB68F5CFA42C091@34093-MBX-C06.mex07a.mlsrvr.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_6D57EF06D84B5541AF530227504BB68F5CFA42C09134093MBXC06me_" MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 17 Feb 2011 17:15:57 -0500 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: -6.0 (------) --_000_6D57EF06D84B5541AF530227504BB68F5CFA42C09134093MBXC06me_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm not sure whether this is a bug or not. On Redhat Enterprise Linux, the cut command will accept the following " cut= -c0-5 " (Cut ver 5.97) On Fedora it will not accept the 0, it must be " cut -c1-5 " (cut ver 8.5) Although both are functionally the same, they seem to only return 5 charact= ers The script it was written in worked without problems from Redhat 7.2 to pre= sent RHEL I only noticed the problem with fedora 13 and 14. I was able to copy the cut command from RHEL to Fedora 14 and it works fine= . What am losing between these two versions? Was there a divergence somewhere along the way where cut stopped tolerating= the the 0 base index? Thanks George Gallen Senior Programmer/Analyst Accounting/Data Division, EDI Administrator ggallen@wyanokegroup.com ph:856.848.9005 Ext 220 The Wyanoke Group http://www.wyanokegroup.com --_000_6D57EF06D84B5541AF530227504BB68F5CFA42C09134093MBXC06me_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
I'm not sure whether this is a bug or not.
 
On Redhat Enterprise Linux, the cut command will accept the following = " cut -c0-5 " (Cut ver 5.97)
On Fedora it will not accept the 0, it must be " cut -c1-5 "= (cut ver 8.5)
 
Although both are functionally the same, they seem to only return 5 ch= aracters
The script it was written in worked without problems from Redhat 7.2 t= o present RHEL
I only noticed the problem with fedora 13 and 14.
 
I was able to copy the cut command from RHEL to Fedora 14 and it works= fine. What am losing
  between these two versions?
 
Was there a divergence somewhere along the way where cut stopped toler= ating the
   the 0 base index?
 
Thanks
 
George Gallen
Senior Programmer/Analyst
Accounting/Data Division, EDI Administrator
ggallen@wyanokegroup.com
ph:856.848.9005 Ext 220
The Wyanoke Gr= oup
http://www.wyanokegroup.com
 
 
 
--_000_6D57EF06D84B5541AF530227504BB68F5CFA42C09134093MBXC06me_-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 17 17:35:49 2011 Received: (at 8070-done) by debbugs.gnu.org; 17 Feb 2011 22:35:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqCRw-0000Zc-U2 for submit@debbugs.gnu.org; Thu, 17 Feb 2011 17:35:49 -0500 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqCRu-0000ZO-PH for 8070-done@debbugs.gnu.org; Thu, 17 Feb 2011 17:35:47 -0500 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 687AD600C0; Thu, 17 Feb 2011 23:44:52 +0100 (CET) From: Jim Meyering To: George Gallen Subject: Re: bug#8070: cut command In-Reply-To: <6D57EF06D84B5541AF530227504BB68F5CFA42C091@34093-MBX-C06.mex07a.mlsrvr.com> (George Gallen's message of "Thu, 17 Feb 2011 16:19:53 -0600") References: <6D57EF06D84B5541AF530227504BB68F5CFA42C091@34093-MBX-C06.mex07a.mlsrvr.com> Date: Thu, 17 Feb 2011 23:44:52 +0100 Message-ID: <87r5b646xn.fsf@rho.meyering.net> Lines: 25 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.8 (-----) X-Debbugs-Envelope-To: 8070-done Cc: 8070-done@debbugs.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: -5.8 (-----) George Gallen wrote: > I'm not sure whether this is a bug or not. > > On Redhat Enterprise Linux, the cut command will accept the following " cut -c0-5 " (Cut ver 5.97) > On Fedora it will not accept the 0, it must be " cut -c1-5 " (cut ver 8.5) > > Although both are functionally the same, they seem to only return 5 characters > The script it was written in worked without problems from Redhat 7.2 to present RHEL > I only noticed the problem with fedora 13 and 14. > > I was able to copy the cut command from RHEL to Fedora 14 and it works fine. What am losing > between these two versions? > > Was there a divergence somewhere along the way where cut stopped tolerating the > the 0 base index? Right. That change was due to a bug fix. Here's part of coreutils' NEWS file: * Noteworthy changes in release 6.9.91 (2007-12-15) [beta] cut now diagnoses a range starting with zero (e.g., -f 0-2) as invalid; before, it would treat it as if it started with 1 (-f 1-2). "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-" From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 17 17:37:07 2011 Received: (at 8070) by debbugs.gnu.org; 17 Feb 2011 22:37:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqCTD-0000bu-JQ for submit@debbugs.gnu.org; Thu, 17 Feb 2011 17:37:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqCTA-0000bQ-Oh for 8070@debbugs.gnu.org; Thu, 17 Feb 2011 17:37:06 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1HMkAYQ009031 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 17 Feb 2011 17:46:10 -0500 Received: from [10.3.113.37] (ovpn-113-37.phx2.redhat.com [10.3.113.37]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1HMk7gx008603; Thu, 17 Feb 2011 17:46:09 -0500 Message-ID: <4D5DA52F.5040907@redhat.com> Date: Thu, 17 Feb 2011 15:46:07 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 MIME-Version: 1.0 To: George Gallen Subject: Re: bug#8070: cut command References: <6D57EF06D84B5541AF530227504BB68F5CFA42C091@34093-MBX-C06.mex07a.mlsrvr.com> In-Reply-To: <6D57EF06D84B5541AF530227504BB68F5CFA42C091@34093-MBX-C06.mex07a.mlsrvr.com> X-Enigmail-Version: 1.1.2 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig51C9F525E646886B3B2E04EF" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -10.2 (----------) X-Debbugs-Envelope-To: 8070 Cc: 8070@debbugs.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: -10.2 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig51C9F525E646886B3B2E04EF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 02/17/2011 03:19 PM, George Gallen wrote: > I'm not sure whether this is a bug or not. >=20 > On Redhat Enterprise Linux, the cut command will accept the following "= cut -c0-5 " (Cut ver 5.97) > On Fedora it will not accept the 0, it must be " cut -c1-5 " (cut ver 8= =2E5) Thanks for the report. POSIX states this: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cut.html "The application shall ensure that the option-argument list (see options -b, -c, and -f below) is a -separated list or -separated list of positive numbers and ranges. Ranges can be in three forms. The first is two positive numbers separated by a ( low- high), which represents all fields from the first number to the second number. The second is a positive number preceded by a (- high), which represents all fields from field number 1 to that number. The third is a positive number followed by a ( low-), which represents that number to the last field, inclusive." 0 is not a positive integer, it lends itself to confusion (is the first character 0-based or 1-based?), and coreutils had not documented it as an explicit extension, therefore this functionality was removed as a bug fix in 6.9.90: http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=3Da6a447fc And NEWS backs this up: cut now diagnoses a range starting with zero (e.g., -f 0-2) as invalid;= before, it would treat it as if it started with 1 (-f 1-2). > I was able to copy the cut command from RHEL to Fedora 14 and it works = fine. What am losing > between these two versions? Your script was not POSIX compliant to begin with - it was pure luck that it worked for you in older installations. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig51C9F525E646886B3B2E04EF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJNXaUvAAoJEKeha0olJ0NqPZUH/iIxHQyDTP8wj7TP9sNi2Qge ED4g9WsTxuhfP2kYbHGz23VAN8espd3P2o9UfJBkSJz9mBlW+aRRDxcNMc2gicmx cTuCR4owcniGY5kApkFZPxDOpVZVlglUiFdssg0b26kRRzdWHjdtpXmSdasXDKk7 CKiNCpMT0yB4oPAaHKf1b7yK5Dv3XblWA5gHRIfZyQQkO3LFXev0GefGqnckGryD x+hexV49qTzUN7Y+xJdyvj4IqraghJ51YCz1vC3AyK9njozvfj31FBvqQQ7y4zTN 08Xlv5A3SV1J/1LrkJC4Y7IV37YSlvQmoqBYQid4tobyPsM0/G0J+6XBE62Wvz4= =9kRf -----END PGP SIGNATURE----- --------------enig51C9F525E646886B3B2E04EF-- From unknown Sat Jun 21 10:45:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 18 Mar 2011 11:24:04 +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