[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6949: Uniq command should allow total to be displayed
From: |
Alan Curry |
Subject: |
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