GNU bug report logs - #10287
[wishlist] uniq can remove non adjacent lines

Previous Next

Package: coreutils;

Reported by: Stéphane Blondon <stephane.blondon <at> gmail.com>

Date: Tue, 13 Dec 2011 02:52:01 UTC

Severity: wishlist

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stéphane Blondon <stephane.blondon <at> gmail.com>
Subject: bug#10287: closed (Re: bug#10287: [wishlist] uniq can remove non
 adjacent lines)
Date: Tue, 13 Dec 2011 08:47:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#10287: [wishlist] uniq can remove non adjacent lines

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 10287 <at> debbugs.gnu.org.

-- 
10287: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10287
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Stéphane Blondon <stephane.blondon <at> gmail.com>
Cc: 10287-done <at> debbugs.gnu.org
Subject: Re: bug#10287: [wishlist] uniq can remove non adjacent lines
Date: Tue, 13 Dec 2011 08:45:24 +0000
On 12/12/2011 10:54 PM, Stéphane Blondon wrote:
> Tool: uniq
> Priority: wishlist
> 
> Hello,
> 
> I think `uniq` should have an additional option (for example -a,
> --all) to remove same lines but not adjacent.
> 
> The man page explains a workaround based on `sort` but it can be
> complex to use. Few weeks ago, I had to `uniq`-ize random numbers and
> the sort couldn't really work. Fortunately, the order was not
> important so using `sort | uniq | sort --random-sort` was an
> acceptable solution. I imagine cases based on other tools like `top`
> could be a problem too.
> 
> If you are interested, I could try to provide a patch. (I have learnt
> C but I don't use it today.)
> 
> I don't think the increase of memory use is a problem today, so a
> warning in the manpage should be enought.

Well that would increase the complexity of `uniq` a _lot_
http://lists.gnu.org/archive/html/coreutils/2011-11/msg00018.html
For that reason I would be against adding such a feature.
Note improving the field selection of `uniq` is appropriate,
and would make DSU solutions using sort, easier to implement.

cheers,
Pádraig.

[Message part 3 (message/rfc822, inline)]
From: Stéphane Blondon <stephane.blondon <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: [wishlist] uniq can remove non adjacent lines
Date: Mon, 12 Dec 2011 23:54:57 +0100
Tool: uniq
Priority: wishlist

Hello,

I think `uniq` should have an additional option (for example -a,
--all) to remove same lines but not adjacent.

The man page explains a workaround based on `sort` but it can be
complex to use. Few weeks ago, I had to `uniq`-ize random numbers and
the sort couldn't really work. Fortunately, the order was not
important so using `sort | uniq | sort --random-sort` was an
acceptable solution. I imagine cases based on other tools like `top`
could be a problem too.

If you are interested, I could try to provide a patch. (I have learnt
C but I don't use it today.)

I don't think the increase of memory use is a problem today, so a
warning in the manpage should be enought.


Thank for all,
-- 
Stéphane



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

Previous Next


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