GNU bug report logs - #6949
Uniq command should allow total to be displayed

Previous Next

Package: coreutils;

Reported by: "Miles Duke" <Miles.Duke <at> erdas.com>

Date: Mon, 30 Aug 2010 15:43:01 UTC

Severity: wishlist

To reply to this bug, email your comments to 6949 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6949; Package coreutils. (Mon, 30 Aug 2010 15:43:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Miles Duke" <Miles.Duke <at> erdas.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 30 Aug 2010 15:43:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Miles Duke" <Miles.Duke <at> erdas.com>
To: <bug-coreutils <at> gnu.org>
Subject: Uniq command should allow total to be displayed
Date: Mon, 30 Aug 2010 11:21:08 -0400
[Message part 1 (text/plain, inline)]
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 <at> erdas.com)

 

[Message part 2 (text/html, inline)]

Severity set to 'wishlist' from 'normal' Request was from Bob Proulx <bob <at> proulx.com> to control <at> debbugs.gnu.org. (Mon, 30 Aug 2010 17:14:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6949; Package coreutils. (Mon, 30 Aug 2010 21:04:02 GMT) Full text and rfc822 format available.

Message #10 received at 6949 <at> debbugs.gnu.org (full text, mbox):

From: "Alan Curry" <pacman-cu <at> kosh.dhis.org>
To: Miles.Duke <at> erdas.com (Miles Duke)
Cc: 6949 <at> debbugs.gnu.org
Subject: Re: bug#6949: Uniq command should allow total to be displayed
Date: Mon, 30 Aug 2010 16:04:37 -0500 (GMT+5)
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




This bug report was last modified 15 years and 12 days ago.

Previous Next


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