bug-coreutils
[Top][All Lists]
Advanced

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

Re: Feature request for sort -u -k ...


From: Pádraig Brady
Subject: Re: Feature request for sort -u -k ...
Date: Mon, 27 Nov 2006 10:03:01 +0000
User-agent: Mozilla Thunderbird 1.0.8 (X11/20060502)

David Kastrup wrote:
> Hi,
> 
> if one calls sort -u with -k fields or other things that can make
> unequal files compare as equal, sort always keeps the first of all
> lines that are considered equal.
> 
> If one is compressing the information of some data gathering process,
> usually the last line is the one which one wants to keep.
> 
> It would be nice if there was an additional option to sort that could
> provide this behavior.

This is way to specific to be adding to sort IMHO.
It it was to be added anywhere it would be "uniq"
when it get's support for -k field specifications.

> While one can do this by writing
> 
> tac | sort -u ...
> 
> this is not really elegant.

Looks elegant to me.

Pádraig.




reply via email to

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