[Top][All Lists]

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

Re: Support bytesize comparison in sort

From: Andrew D Jewell
Subject: Re: Support bytesize comparison in sort
Date: Thu, 6 Apr 2006 10:38:45 -0400

I like the idea, but I object to using up yet another single-letter
option for this (they're not renewable - the ASCII character set has a
fixed size).  I suggest that we use a long option only.

I agree halfway. As a separate command line argument, using up another single character might (possibly) be too aggressive.

However, we do need to allocate a single character for it as part of the -k field specification; otherwise, as you said, how can you sort some fields this way and some fields that way. I'd recommend h, to match the -h of ls and df.

As for the implementation, unless I'm confused, it only deals with K,M and G. It should at least support T if not P, E, Z and Y.

I don't know if this is important, but I also don't see anything that would normalize numbers, so comparing 1000000 to 1M wouldn't do the right thing. To fix that would open another can of worms, in that you'd need to know if your M was 1000*1000 or 1024*1024.


reply via email to

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