bug-coreutils
[Top][All Lists]
Advanced

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

Re: "sort" utility short comming or bug: cannot sort according to "human


From: Pádraig Brady
Subject: Re: "sort" utility short comming or bug: cannot sort according to "human format" criterion.
Date: Tue, 03 Jan 2006 10:15:14 +0000
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)

Andre Gompel wrote:

>Dear colleague:
>  it looks like a bug... or at least a short comming.
>
>If I use the -n or -g option I cannot sort according to the output format of 
>the "du" or "ls" commands.
>
>Example:
>
>       du -chs * |sort -n |more
>
>I am not sure what would be the best approach, but I would tend to add one 
>more option (says -h for "human format" compatibility).
>  
>
I see what you mean, but that would definitely not
be a stable sort as info is lost in the number -> human conversion.
You really need to sort before the human conversion.
Have a look at: http://www.pixelbeat.org/scripts/dutop

Pádraig.




reply via email to

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