On Sun, Sep 05, 2004 at 04:49:38PM -0700, Paul Eggert <[EMAIL PROTECTED]> wrote:
> Lucas Nussbaum <[EMAIL PROTECTED]> writes:
> 
> > So 12345K < 1M, but I think it is acceptable if
> > properly documented (no software will never output 12345K).
> 
> Unfortunately some software does output "12345K".  For example:
> 
> $ echo '' | dd bs=1 seek=12641279 of=big
> 1+0 records in
> 1+0 records out
> $ ls -l --block=K big
> -rw-r--r--  1 eggert eggert 12345K 2004-09-05 16:42 big
> 
> I don't see an easy, efficient fix for this.  If we want to be able to
> handle binary multipliers like the "K" above, and we want to avoid
> errors, we need to have multiword arithmetic.
> 
> > Oh and it is just sort -h, not sort -hn.
> 
> It's OK for -h to imply -n, but it'd be nice if it could also be
> combined with -g.  Come to think of it, if -h implied -g instead, you
> might have a simpler implementation (albeit one with rounding errors
> and slower performance).

This would break with exabytes. My need for this is only to be able to
sort output of commands like du -h. I think that's what most people
would use it for.

Don't you think we should document this properly, with what doesn't work
too, and that it would be enough for most people's need ?
-- 
| Lucas Nussbaum
| [EMAIL PROTECTED]    [EMAIL PROTECTED]    GPG: 1024D/023B3F4F |
| jabber: [EMAIL PROTECTED]   http://www.lucas-nussbaum.net |
| fingerprint: 075D 010B 80C3 AC68 BD4F B328 DA19 6237 023B 3F4F |


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to