[Top][All Lists]

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

Re: sort by line length

From: Pádraig Brady
Subject: Re: sort by line length
Date: Tue, 24 Apr 2007 14:07:26 +0100
User-agent: Thunderbird (X11/20061116)

Georg Müller wrote:
> Dear coreutils team,
> I would like to see a "sort by line length" in the sort tool.
> Is anything like this planned.
> It seems easy to implement.
> I could also write the code for that, if you wish.

That seems like a very specific need which
is probably best fulfilled with a combination of tools?
Have you an example of why you need this?

If I was doing it, I would use my funcpy tool¹ as follows,
to transform the data into the appropriate format:

funcpy '"%d\t%s" % (len(x),x)' | sort -k1,1n | cut -f2-



reply via email to

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