GNU logs - #35337, boring messages

Message sent to bug-grep@HIDDEN:

X-Loop: help-debbugs@HIDDEN
Subject: bug#35337: Document the recommended way to get the :0s out of -c output
Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at>>
Resent-CC: bug-grep@HIDDEN
Resent-Date: Sat, 20 Apr 2019 12:22:03 +0000
Resent-Message-ID: <handler.35337.B.1555762919765 <at>>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 35337
X-GNU-PR-Package: grep
To: 35337 <at>
X-Debbugs-Original-To: bug-grep@HIDDEN
Received: via spool by submit <at> id=B.1555762919765
          (code B ref -1); Sat, 20 Apr 2019 12:22:03 +0000
Received: (at submit) by; 20 Apr 2019 12:21:59 +0000
Received: from localhost ([]:45886
	by with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at>>)
	id 1hHp0J-0000CH-I6
	for submit <at>; Sat, 20 Apr 2019 08:21:59 -0400
Received: from ([]:39799)
 by with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1hHp0H-0000Bq-0P
 for submit <at>; Sat, 20 Apr 2019 08:21:57 -0400
Received: from ([]:40494)
 by with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1hHp0B-0003ys-T1
 for submit <at>; Sat, 20 Apr 2019 08:21:51 -0400
Received: from ([]:54180)
 by with esmtp (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1hHp0A-0001C7-Tl
 for bug-grep@HIDDEN; Sat, 20 Apr 2019 08:21:51 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Level: *
X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_50,FROM_EXCESS_BASE64,
 RCVD_IN_DNSWL_NONE,URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1hHp0A-0003yA-0A
 for bug-grep@HIDDEN; Sat, 20 Apr 2019 08:21:50 -0400
Received: from ([]:5367)
 by with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1hHp09-0003wd-LP
 for bug-grep@HIDDEN; Sat, 20 Apr 2019 08:21:49 -0400
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from (localhost [])
 by (Postfix) with ESMTP id 2A7F36A1A52
 for <bug-grep@HIDDEN>; Sat, 20 Apr 2019 12:21:47 +0000 (UTC)
Received: from
 (100-96-7-60.trex.outbound.svc.cluster.local [])
 (Authenticated sender: dreamhost)
 by (Postfix) with ESMTPA id 8D26D6A1576
 for <bug-grep@HIDDEN>; Sat, 20 Apr 2019 12:21:46 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from ([TEMPUNAVAIL].
 []) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by (trex/5.17.2); Sat, 20 Apr 2019 12:21:47 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Inform-Thoughtful: 0d835e6a6b6f8944_1555762906997_1399156276
X-MC-Loop-Signature: 1555762906997:763595910
X-MC-Ingress-Time: 1555762906997
Received: from (localhost [])
 by (Postfix) with ESMTP id 3760E80182
 for <bug-grep@HIDDEN>; Sat, 20 Apr 2019 05:21:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed;; h=from:to
 :content-transfer-encoding;; bh=tZgo42LmJUDK0uwBjD
 HyJs8c0Cw=; b=eewgjD+foJL/uVSdCnAC1/Op6Nz7f5OWiD5gp7AeovOiEagFnX
Received: from ( [])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
 bits)) (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by (Postfix) with ESMTPSA id 7DE8280181
 for <bug-grep@HIDDEN>; Sat, 20 Apr 2019 05:21:44 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a9
From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Date: Sat, 20 Apr 2019 20:13:23 +0800
Message-ID: <878sw4zxgc.5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrgedtgdegudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgfgsehtkeertddttdejnecuhfhrohhmpejnnjjnucffrghnucflrggtohgsshhonhcuoehjihgurghnnhhisehjihgurghnnhhirdhorhhgqeenucfkphepuddrudejtddrkedurddvfeefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehjihgurghnnhhirdhorhhgpdhinhgvthepuddrudejtddrkedurddvfeefpdhrvghtuhhrnhdqphgrthhhpeeprehuthhfqdekreeureehiehmpfehnfhiheehsgevkeerpecuffgrnhculfgrtghosghsohhnuceojhhiuggrnhhnihesjhhiuggrnhhnihdrohhrgheqpdhmrghilhhfrhhomhepjhhiuggrnhhnihesjhhiuggrnhhnihdrohhrghdpnhhrtghpthhtohepsghughdqghhrvghpsehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by GNU/Linux 2.6.x
X-Spam-Score: -1.3 (-)
X-BeenThere: debbugs-submit <at>
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <>
List-Unsubscribe: <>, 
 <mailto:debbugs-submit-request <at>>
List-Archive: <>
List-Post: <mailto:debbugs-submit <at>>
List-Help: <mailto:debbugs-submit-request <at>>
List-Subscribe: <>, 
 <mailto:debbugs-submit-request <at>>
Errors-To: debbugs-submit-bounces <at>
Sender: "Debbugs-submit" <debbugs-submit-bounces <at>>
X-Spam-Score: -2.3 (--)

Boy they really blew it when they invented -c,
   (info "(grep) General Output Control")

       Suppress normal output; instead print a count of matching lines fo=
       each input file.  With the =E2=80=98-v=E2=80=99 (=E2=80=98--invert=
-match=E2=80=99) option, count
       non-matching lines.  (=E2=80=98-c=E2=80=99 is specified by POSIX.)

Who in the world ever wants to know about the zero match counts (:0)? ;-)
OK, well then add some extra switch for the rest of us... or at least the=
page should mention how the pros filter them out.

time find * -name \*.html | xargs grep -l staticmap | xargs grep -c stati=
cmap | head -n 3

real	0m0.015s
user	0m0.013s
sys	0m0.002s

time find * -name \*.html | xargs grep -c staticmap | grep -v :0$   | hea=
d -n 3

real	0m0.017s
user	0m0.011s
sys	0m0.004s

(#1 is a big waste, but the real time is randomly a little shorter, as
it takes larger inputs so really see the difference.)

Anyway I've never ever wanted the :0s.

Wait! Maybe "-cl" or "-lc" will give us what we want!
Alas, they are just equivalent to "-l".
(As I suppose that fact is not documented, perhaps it could be given a
new (non-backwardly compatible, alas) definition...)

Message sent:

Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Subject: bug#35337: Acknowledgement (Document the recommended way to get
 the :0s out of -c output)
Message-ID: <handler.35337.B.1555762919765.ack <at>>
References: <878sw4zxgc.5.fsf@HIDDEN>
X-Gnu-PR-Message: ack 35337
X-Gnu-PR-Package: grep
Reply-To: 35337 <at>
Date: Sat, 20 Apr 2019 12:22:04 +0000

Thank you for filing a new bug report with

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):

If you wish to submit further information on this problem, please
send it to 35337 <at>

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.