bug-coreutils
[Top][All Lists]
Advanced

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

bug#21000: coreutils 8.24 sort -h gets ordering wrong


From: Christopher Samuel
Subject: bug#21000: coreutils 8.24 sort -h gets ordering wrong
Date: Tue, 07 Jul 2015 12:00:14 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hi there,

When trying to sort with the -h option (--human-numeric-sort) it seems
to fail to get the ordering correct, for instance in a column of values
of memory usage from the Slurm HPC batch system you get this:

  2868768K
  2875504K
  3278652K
  3435484K
  3461744K
  4050208K
   419.50M
      421M
      422M
   447.50M
      451M
      467M
   478.50M
      479M
      496M
      998M
     1.09G
     1.31G
     1.31G
     1.31G

and yet the values in KB are far in excess of the GB values, let alone
the MB ones (4050208K being the just over 4GB).

Looking at the source it appears that this ordering is derived purely on
an ordering of the suffixes rather than doing any form of conversion.

I had then thought that I needed to specify the -n option as well, but
it turns out that the -n and -h options are mutually exclusive for some
reason.

All the best,
Chris
-- 
 Christopher Samuel        Senior Systems Administrator
 VLSCI - Victorian Life Sciences Computation Initiative
 Email: address@hidden Phone: +61 (0)3 903 55545
 http://www.vlsci.org.au/      http://twitter.com/vlsci





reply via email to

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