GNU bug report logs - #16831
don't say uniq -D -c is meaningless

Previous Next

Package: coreutils;

Reported by: mcmasters <daniel_mcmasters <at> merck.com>

Date: Fri, 21 Feb 2014 16:39:01 UTC

Severity: normal

Tags: wontfix

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: mcmasters <daniel_mcmasters <at> merck.com>
Cc: 16831 <at> debbugs.gnu.org
Subject: bug#16831: don't say uniq -D -c is meaningless
Date: Fri, 21 Feb 2014 18:15:49 +0000
On 02/21/2014 02:28 PM, mcmasters wrote:
> I think uniq -D -c may be meaningful when used in conjuction with -f
> Specifically, I wanted to use uniq -D -c -f 1 to find lines that are
> identical with respect to field 2 (-f 1), get a listing of how many times
> they occur (-c), but not throw away the differences in field 1 (-D)
> Is there a way to do that with uniq?

So given:

a v1
b v2
c v2

you want output like this?

2 b v2
2 c v2

It's unusual to repeat counts like that,
and uniq doesn't support that at present.

Could you expand on the use case perhaps?

thanks,
Pádraig.




This bug report was last modified 6 years and 225 days ago.

Previous Next


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