GNU bug report logs - #5832
Feature request: uniq -k

Previous Next

Package: coreutils;

Reported by: Raphael Clifford <drraph <at> gmail.com>

Date: Sat, 3 Apr 2010 18:50:03 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Adrien Kunysz <adrien <at> kunysz.be>, 10365 <at> debbugs.gnu.org, 5832 <at> debbugs.gnu.org
Subject: bug#5832: bug#10365: [PATCH] uniq: add ability to skip last N chars or fields
Date: Mon, 26 Dec 2011 18:03:40 +0000
On 12/26/2011 05:39 PM, Paul Eggert wrote:
> On 12/26/11 08:35, Pádraig Brady wrote:
>> supporting --key would not provide this functionality.
> 
> It would support it in the most common cases, no?
> That is, if every line has (say) 10 fields, then
> the proposed 'uniq -F3' would be equivalent to
> the proposed 'uniq -k1,7'.

That's what I thought at first too,
but then why didn't Adrien propose the
more normal --check-fields=7 rather than
the unusual -F3.

> I can't offhand think of good use cases for uniq -F
> that would not be subsumed by uniq -k.

Me too, Having a variable number of fields per line,
but ignoring the last constant N fields is very unusual,
and why I asked for a concrete example.

Personally I'm leaning towards suggesting `the rev| uniq -f | rev`
is fine for this edge case.

cheers,
Pádraig.




This bug report was last modified 13 years and 182 days ago.

Previous Next


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