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

Full log


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 13 days ago.

Previous Next


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