From unknown Mon Sep 08 16:47:27 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#6949 <6949@debbugs.gnu.org> To: bug#6949 <6949@debbugs.gnu.org> Subject: Status: Uniq command should allow total to be displayed Reply-To: bug#6949 <6949@debbugs.gnu.org> Date: Mon, 08 Sep 2025 23:47:27 +0000 retitle 6949 Uniq command should allow total to be displayed reassign 6949 coreutils submitter 6949 "Miles Duke" severity 6949 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 11:42:57 2010 Received: (at submit) by debbugs.gnu.org; 30 Aug 2010 15:42:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq6Vd-0004qw-20 for submit@debbugs.gnu.org; Mon, 30 Aug 2010 11:42:57 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq6Ak-0004jI-Vx for submit@debbugs.gnu.org; Mon, 30 Aug 2010 11:21:23 -0400 Received: from lists.gnu.org ([199.232.76.165]:39558) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Oq6CI-0004bq-If for submit@debbugs.gnu.org; Mon, 30 Aug 2010 11:22:58 -0400 Received: from [140.186.70.92] (port=52997 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq6CH-00016C-0P for bug-coreutils@gnu.org; Mon, 30 Aug 2010 11:22:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq6CB-0001Ev-Ui for bug-coreutils@gnu.org; Mon, 30 Aug 2010 11:22:56 -0400 Received: from exprod5og112.obsmtp.com ([64.18.0.24]:40237) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Oq6CB-0001EF-HJ for bug-coreutils@gnu.org; Mon, 30 Aug 2010 11:22:51 -0400 Received: from source ([209.156.31.70]) by exprod5ob112.postini.com ([64.18.4.12]) with SMTP ID DSNKTHvMyLX2hhoYRhhRwGDHnzaChRAn7WzQ@postini.com; Mon, 30 Aug 2010 08:22:51 PDT X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CB4856.F937B530" Subject: Uniq command should allow total to be displayed Date: Mon, 30 Aug 2010 11:21:08 -0400 Message-ID: <42CFFC29FBA4FC48A39DBAFA5A2238D907E48FBA@ATLEX03.lggm.llc> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Uniq command should allow total to be displayed Thread-Index: ActIVviqH20H804/QJiG0wduen2RQQ== From: "Miles Duke" To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 30 Aug 2010 11:42:54 -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.3 (-----) This is a multi-part message in MIME format. ------_=_NextPart_001_01CB4856.F937B530 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable This is not a bug, but a feature request. =20 'uniq --count' is an excellent tool for summarizing data, but it is missing one useful feature - an overall total. =20 It's embarrassing to have to go to excel to bring the totals together. =20 I suggest a new -t (--total) option: =20 * When combined with '--count', it reports the sum of the count lines * Without the '--count', it reports the number of lines printed by uniq =20 As a new parameter, it will not break any scripts that rely upon the current output of uniq. =20 =20 Miles Duke (Miles.Duke@erdas.com) =20 ------_=_NextPart_001_01CB4856.F937B530 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

This is not a bug, but a feature = request.

 

‘uniq --count’ is an excellent tool for = summarizing data, but it is missing one useful feature – an overall = total.

 

It’s embarrassing to have to go to excel to = bring the totals together.

 

I suggest a new -t (--total) option:

 

·         When combined with ‘--count’, = it reports the sum of the count lines

·         Without the ‘--count’, it = reports the number of lines printed by uniq

 

As a new parameter, it will not break any scripts = that rely upon the current output of uniq.

 

 

Miles Duke (Miles.Duke@erdas.com)

 

------_=_NextPart_001_01CB4856.F937B530-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 13:13:58 2010 Received: (at control) by debbugs.gnu.org; 30 Aug 2010 17:13:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq7vi-0005Zx-4A for submit@debbugs.gnu.org; Mon, 30 Aug 2010 13:13:58 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq7vg-0005Zs-3a for control@debbugs.gnu.org; Mon, 30 Aug 2010 13:13:56 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 63ABB21310 for ; Mon, 30 Aug 2010 11:15:31 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 5F6F52DCFC; Mon, 30 Aug 2010 11:15:31 -0600 (MDT) Date: Mon, 30 Aug 2010 11:15:31 -0600 From: Bob Proulx To: control@debbugs.gnu.org Subject: change severity Message-ID: <20100830171531.GA11895@hysteria.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -2.4 (--) 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: -2.4 (--) severity 6949 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 17:03:03 2010 Received: (at 6949) by debbugs.gnu.org; 30 Aug 2010 21:03:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqBVO-0008PO-Tx for submit@debbugs.gnu.org; Mon, 30 Aug 2010 17:03:03 -0400 Received: from c-69-245-226-104.hsd1.in.comcast.net ([69.245.226.104] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OqBVN-0008P1-Er for 6949@debbugs.gnu.org; Mon, 30 Aug 2010 17:03:01 -0400 Received: (qmail 28877 invoked by uid 1000); 30 Aug 2010 21:04:37 -0000 Message-ID: <20100830210437.28876.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#6949: Uniq command should allow total to be displayed To: Miles.Duke@erdas.com (Miles Duke) Date: Mon, 30 Aug 2010 16:04:37 -0500 (GMT+5) In-Reply-To: <42CFFC29FBA4FC48A39DBAFA5A2238D907E48FBA@ATLEX03.lggm.llc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Miles Duke writes: > > 'uniq --count' is an excellent tool for summarizing data, but it is > missing one useful feature - an overall total. This might be a good idea... > > It's embarrassing to have to go to excel to bring the totals together. [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [69.245.226.104 listed in dnsbl.sorbs.net] 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [69.245.226.104 listed in zen.spamhaus.org] 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.5000] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS X-Debbugs-Envelope-To: 6949 Cc: 6949@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: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Miles Duke writes: > > 'uniq --count' is an excellent tool for summarizing data, but it is > missing one useful feature - an overall total. This might be a good idea... > > It's embarrassing to have to go to excel to bring the totals together. [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [69.245.226.104 listed in zen.spamhaus.org] 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [69.245.226.104 listed in dnsbl.sorbs.net] 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.4610] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS -0.0 AWL AWL: From: address is in the auto white-list Miles Duke writes: > > 'uniq --count' is an excellent tool for summarizing data, but it is > missing one useful feature - an overall total. This might be a good idea... > > It's embarrassing to have to go to excel to bring the totals together. ...but you can't think of any other tool that can add up a bunch of numbers?! You're using dynamite to kill a mosquito. There must be a dozen basic utilities that can do arithmetic. Like awk: ... | uniq -c | awk '{t+=$1}END{print t,"total"}1' -- Alan Curry