bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16831: don't say uniq -D -c is meaningless


From: Pádraig Brady
Subject: bug#16831: don't say uniq -D -c is meaningless
Date: Fri, 21 Feb 2014 18:15:49 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]