[Top][All Lists]

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

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

From: Stéphane Blondon
Subject: bug#10287: [wishlist] uniq can remove non adjacent lines
Date: Mon, 12 Dec 2011 23:54:57 +0100

Tool: uniq
Priority: wishlist


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,

reply via email to

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