From unknown Fri Aug 15 02:05:15 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#6383 <6383@debbugs.gnu.org> To: bug#6383 <6383@debbugs.gnu.org> Subject: Status: cat has misleading documentation Reply-To: bug#6383 <6383@debbugs.gnu.org> Date: Fri, 15 Aug 2025 09:05:15 +0000 retitle 6383 cat has misleading documentation reassign 6383 coreutils submitter 6383 "Chas. Owens" severity 6383 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 09 10:30:40 2010 Received: (at submit) by debbugs.gnu.org; 9 Jun 2010 14:30:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMMIi-0008Cp-B6 for submit@debbugs.gnu.org; Wed, 09 Jun 2010 10:30:40 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMLRY-0007pL-Ec for submit@debbugs.gnu.org; Wed, 09 Jun 2010 09:35:45 -0400 Received: from lists.gnu.org ([199.232.76.165]:57701) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OMLRT-0007Ss-AJ for submit@debbugs.gnu.org; Wed, 09 Jun 2010 09:35:39 -0400 Received: from [140.186.70.92] (port=38287 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMLRN-0002tb-Ry for bug-coreutils@gnu.org; Wed, 09 Jun 2010 09:35:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMLRM-0002CD-C7 for bug-coreutils@gnu.org; Wed, 09 Jun 2010 09:35:33 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:65020) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMLRM-0002Bx-9z for bug-coreutils@gnu.org; Wed, 09 Jun 2010 09:35:32 -0400 Received: by gyg4 with SMTP id 4so4929154gyg.0 for ; Wed, 09 Jun 2010 06:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=eHnLDZ8oSEL3uqQUsy11tcdo2jJREVwN9cP3ws7/UBc=; b=NoqCiUZ+2jLdX9mNGRVfyUUyl/dZgpqP72PuQFxE0HboFxkVmX50ZrkpWy76+utj/t +/Teu8HTuZJRsJn6sAKBdEkihtL+oG5hstVM+gnogLjn3wxp6DJwbpjnSob+i0/Vc8Oj XS71b4tmZBPHYkFw8h3NMoS7/W01Xu6G2tv6Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=uT2HT5w/YO6H8yrK31uieKfl5vfSQpu+y2Msq39yvUJb4PuC7kwa1D8dmWbUpVOJ6y AJ22GSKMbq46cAgcT4iR8/+IQ8NvzSJK2JE4Ox7VlP5zqjOMEPaDMYHMlE33smJmP1ZH or+8bgX2lnB/9DSJrq3/kCNbwUZ0kcAlrkV8I= Received: by 10.150.62.2 with SMTP id k2mr16993442yba.425.1276090531190; Wed, 09 Jun 2010 06:35:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.40.19 with HTTP; Wed, 9 Jun 2010 06:35:11 -0700 (PDT) From: "Chas. Owens" Date: Wed, 9 Jun 2010 09:35:11 -0400 Message-ID: Subject: cat has misleading documentation To: bug-coreutils@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 09 Jun 2010 10:30:39 -0400 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.9 (-----) The -n option is documented as "number all output lines", but when -b is present it only numbers non-blank lines. The documentation should read "number output lines". -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 09 13:17:59 2010 Received: (at 6383) by debbugs.gnu.org; 9 Jun 2010 17:17: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 1OMOud-0001gQ-HX for submit@debbugs.gnu.org; Wed, 09 Jun 2010 13:17:59 -0400 Received: from qmta06.emeryville.ca.mail.comcast.net ([76.96.30.56]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMOub-0001gL-EA for 6383@debbugs.gnu.org; Wed, 09 Jun 2010 13:17:58 -0400 Received: from omta04.emeryville.ca.mail.comcast.net ([76.96.30.35]) by qmta06.emeryville.ca.mail.comcast.net with comcast id TnVo1e0010lTkoCA6tHsbc; Wed, 09 Jun 2010 17:17:52 +0000 Received: from localhost.localdomain ([66.187.234.199]) by omta04.emeryville.ca.mail.comcast.net with comcast id TtHe1e00P4Jo0NS8QtHj6T; Wed, 09 Jun 2010 17:17:50 +0000 From: Eric Blake To: 6383@debbugs.gnu.org Subject: Re: bug#6383: [PATCH] cat: improve documentation Date: Wed, 9 Jun 2010 11:17:12 -0600 Message-Id: <1276103832-25415-1-git-send-email-eblake@redhat.com> X-Mailer: git-send-email 1.7.0.1 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 6383 Cc: chas.owens@gmail.com 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: 0.3 (/) * src/cat.c (usage): Clarify that -b overrides -n. * doc/coreutils.texi (cat invocation): Likewise. * THANKS: Update. Suggested by Chas. Owens, in bug 6383. --- > The -n option is documented as "number all output lines", but when -b > is present it only numbers non-blank lines. The documentation should > read "number output lines". Thanks for the report. -b in isolation also numbers lines; so it is more an issue that -b overrides -n. How about this patch, instead? THANKS | 1 + doc/coreutils.texi | 3 ++- src/cat.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/THANKS b/THANKS index dce3c94..caa40de 100644 --- a/THANKS +++ b/THANKS diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 26b4eba..b27d9d7 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -1494,7 +1494,8 @@ cat invocation @itemx --number @opindex -n @opindex --number -Number all output lines, starting with 1. +Number all output lines, starting with 1. This option is ignored +if @option{-b} is in effect. @item -s @itemx --squeeze-blank diff --git a/src/cat.c b/src/cat.c index eebfb97..c4a2a9e 100644 --- a/src/cat.c +++ b/src/cat.c @@ -92,7 +92,7 @@ Usage: %s [OPTION]... [FILE]...\n\ Concatenate FILE(s), or standard input, to standard output.\n\ \n\ -A, --show-all equivalent to -vET\n\ - -b, --number-nonblank number nonempty output lines\n\ + -b, --number-nonblank number nonempty output lines, overrides -n\n\ -e equivalent to -vE\n\ -E, --show-ends display $ at end of each line\n\ -n, --number number all output lines\n\ -- 1.7.0.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 09 14:16:40 2010 Received: (at 6383) by debbugs.gnu.org; 9 Jun 2010 18:16:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMPpO-00026d-0P for submit@debbugs.gnu.org; Wed, 09 Jun 2010 14:16:40 -0400 Received: from mail-gw0-f44.google.com ([74.125.83.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMP2f-0001kR-2q for 6383@debbugs.gnu.org; Wed, 09 Jun 2010 13:26:17 -0400 Received: by gwj16 with SMTP id 16so591693gwj.3 for <6383@debbugs.gnu.org>; Wed, 09 Jun 2010 10:26:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=7whVmBlozVJ6g4VFszglGPeCW/nmFVTCqPrgs5g6QoE=; b=tuvGZXXNVfKpSsItkRvVj8gdnzgU6bhXO89x4UxhBpmZAf9PvDrxoB2JOhRLAzAUM3 huEjg6tONP5W02CUqcn0dW3xb1FtGkIcRj7hcpTLvVdux3Oyrag0rf2Fy8ZDp7WeEoue Pw2dwFK2tCfTpQibnyVfxtU4wVoliZsytvUuk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=bF/ltXPt/ca/AuFbSJLNN3r+kLmPYQpg7JshYvbFf+JhuyYyhloo/l7JqQt4eKExzA PfDXoDkiRpiGqVlAIeDYLWXoEyDsFvRiKX4w/6YcDAPEN8Gu9kN8CdjuCfJ9IrEOrXLl +MKPylEGysmdm2MFkoofDhX3RL3JcSmIFrHC8= Received: by 10.151.3.25 with SMTP id f25mr43662ybi.183.1276104371195; Wed, 09 Jun 2010 10:26:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.40.19 with HTTP; Wed, 9 Jun 2010 10:25:51 -0700 (PDT) In-Reply-To: <1276103832-25415-1-git-send-email-eblake@redhat.com> References: <1276103832-25415-1-git-send-email-eblake@redhat.com> From: "Chas. Owens" Date: Wed, 9 Jun 2010 13:25:51 -0400 Message-ID: Subject: Re: bug#6383: [PATCH] cat: improve documentation To: Eric Blake Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6383 X-Mailman-Approved-At: Wed, 09 Jun 2010 14:16:37 -0400 Cc: 6383@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: -2.6 (--) That would work as well. I suggested removing the "all" because it was the simplest solution and would move the text closer to what BSD uses, but this spells out the behavior explicitly. On Wed, Jun 9, 2010 at 13:17, Eric Blake wrote: > * src/cat.c (usage): Clarify that -b overrides -n. > * doc/coreutils.texi (cat invocation): Likewise. > * THANKS: Update. > Suggested by Chas. Owens, in bug 6383. > --- > >> The -n option is documented as "number all output lines", but when -b >> is present it only numbers non-blank lines. =C2=A0The documentation shou= ld >> read "number output lines". > > Thanks for the report. =C2=A0-b in isolation also numbers lines; so it is > more an issue that -b overrides -n. =C2=A0How about this patch, instead? > > =C2=A0THANKS =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A01 + > =C2=A0doc/coreutils.texi | =C2=A0 =C2=A03 ++- > =C2=A0src/cat.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A02 +- > =C2=A03 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/THANKS b/THANKS > index dce3c94..caa40de 100644 > --- a/THANKS > +++ b/THANKS > diff --git a/doc/coreutils.texi b/doc/coreutils.texi > index 26b4eba..b27d9d7 100644 > --- a/doc/coreutils.texi > +++ b/doc/coreutils.texi > @@ -1494,7 +1494,8 @@ cat invocation > =C2=A0@itemx --number > =C2=A0@opindex -n > =C2=A0@opindex --number > -Number all output lines, starting with 1. > +Number all output lines, starting with 1. =C2=A0This option is ignored > +if @option{-b} is in effect. > > =C2=A0@item -s > =C2=A0@itemx --squeeze-blank > diff --git a/src/cat.c b/src/cat.c > index eebfb97..c4a2a9e 100644 > --- a/src/cat.c > +++ b/src/cat.c > @@ -92,7 +92,7 @@ Usage: %s [OPTION]... [FILE]...\n\ > =C2=A0Concatenate FILE(s), or standard input, to standard output.\n\ > =C2=A0\n\ > =C2=A0 -A, --show-all =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 equivalent to -v= ET\n\ > - =C2=A0-b, --number-nonblank =C2=A0 =C2=A0number nonempty output lines\n= \ > + =C2=A0-b, --number-nonblank =C2=A0 =C2=A0number nonempty output lines, = overrides -n\n\ > =C2=A0 -e =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 equivalent to -vE\n\ > =C2=A0 -E, --show-ends =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0display $ at end= of each line\n\ > =C2=A0 -n, --number =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 number all = output lines\n\ > -- > 1.7.0.1 > > --=20 Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 17:57:47 2010 Received: (at 6383) by debbugs.gnu.org; 14 Jun 2010 21:57:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOHf8-0003bk-Mm for submit@debbugs.gnu.org; Mon, 14 Jun 2010 17:57:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOHf6-0003bb-5b for 6383@debbugs.gnu.org; Mon, 14 Jun 2010 17:57:45 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5ELvcPB006505 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Jun 2010 17:57:39 -0400 Received: from [10.3.224.215] (vpn-224-215.phx2.redhat.com [10.3.224.215]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5ELvcWu018899; Mon, 14 Jun 2010 17:57:38 -0400 Message-ID: <4C16A599.8000809@redhat.com> Date: Mon, 14 Jun 2010 15:56:41 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Mnenhy/0.8.2 Thunderbird/3.0.4 MIME-Version: 1.0 To: "Chas. Owens" Subject: Re: bug#6383: [PATCH] cat: improve documentation References: <1276103832-25415-1-git-send-email-eblake@redhat.com> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig075A0DF23AF659EAF9B695BA" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Spam-Score: -10.0 (----------) X-Debbugs-Envelope-To: 6383 Cc: 6383@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.0 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig075A0DF23AF659EAF9B695BA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/09/2010 11:25 AM, Chas. Owens wrote: [please don't top-post on technical forums] > That would work as well. I suggested removing the "all" because it > was the simplest solution and would move the text closer to what BSD > uses, but this spells out the behavior explicitly. >=20 > On Wed, Jun 9, 2010 at 13:17, Eric Blake wrote: >> * src/cat.c (usage): Clarify that -b overrides -n. >> * doc/coreutils.texi (cat invocation): Likewise. >> * THANKS: Update. >> Suggested by Chas. Owens, in bug 6383. No other comments, so I went ahead and pushed the patch. Thanks again for the report! --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig075A0DF23AF659EAF9B695BA 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/ iQEcBAEBCAAGBQJMFqWZAAoJEKeha0olJ0NqKr8H/jwU6eKyu2lbxWfbuel/ObtC kxFXp1siW4YLGxE79wGsExQVKgQ4SgBoNCIk2pDVKibX6OxqPD3VFjtpgraTIHIl WVaehFw9zxoyIoAeEvhj5aUUL0MGMoZ0C2zbHjowcmZRS1WdgjQ8wPxWvg5fdonZ 14nS1zgaC8wzMpRc764j/xlz6WkwheiDsKrWw5p64YLzmIJlDSWn7F4YhAc6hym5 dg1qvmBjgYKXIuqn6WdlAO2nI24jEJXM08xR2TvJRkxldPUk6zC3tNQAbRhYCGST KCDH/VLIEroE4JAGG2eMIbF0biND/cev6JUOP3SOzQXbjESbVlT74ElKg5fAmXs= =0jZk -----END PGP SIGNATURE----- --------------enig075A0DF23AF659EAF9B695BA-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 12:29:01 2010 Received: (at control) by debbugs.gnu.org; 14 Jul 2010 16:29:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZ4pQ-0007kz-S5 for submit@debbugs.gnu.org; Wed, 14 Jul 2010 12:29:01 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OZ4pP-0007kr-3h for control@debbugs.gnu.org; Wed, 14 Jul 2010 12:28:59 -0400 Received: (qmail 6180 invoked from network); 14 Jul 2010 16:29:06 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 14 Jul 2010 16:29:06 -0000 Message-ID: <4C3DE583.7000404@draigBrady.com> Date: Wed, 14 Jul 2010 17:27:47 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: control@debbugs.gnu.org X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: control 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: -1.8 (-) close 6383 8.6 From unknown Fri Aug 15 02:05:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 12 Aug 2010 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