GNU bug report logs -
#72159
Numeric sorting does not work with 100.000 values
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 17 Jul 2024 11:05:05 -0700
with message-id <80f6892e-1b85-4f3c-afd4-3d26fe085151 <at> cs.ucla.edu>
and subject line Re: bug#72159: Numeric sorting does not work with 100.000 values
has caused the debbugs.gnu.org bug report #72159,
regarding Numeric sorting does not work with 100.000 values
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
72159: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72159
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi,
I think I found a bug in sort from coreutils-9.5 on Gentoo Linux:
$ LANG=C sort -k 1 -k 3,3n -r somefile.tsv | head
LH00211:37:222VFLLT1:1:2270:9996:7938:TACGTCACG MN908947.3 97.333 150 4 0 1 150 22850 22999 5.82e-46 171
LH00211:37:222VFLLT1:1:2270:9996:7938:TACGTCACG MN908947.3 96.667 150 5 0 1 150 23133 22984 2.53e-45 169
LH00211:37:222VFLLT1:1:2270:9996:23383:CGGGTCCTC MN908947.3 99.333 150 1 0 1 150 22844 22695 7.14e-48 178
LH00211:37:222VFLLT1:1:2270:9996:23383:CGGGTCCTC MN908947.3 99.286 140 1 0 11 150 22568 22707 2.47e-44 166
LH00211:37:222VFLLT1:1:2270:9996:22101:GAAGGATTC MN908947.3 98.667 150 2 0 1 150 22850 22999 3.10e-47 176
LH00211:37:222VFLLT1:1:2270:9996:22101:GAAGGATTC MN908947.3 97.333 150 4 0 1 150 23133 22984 5.82e-46 171
LH00211:37:222VFLLT1:1:2270:9996:21012:CGTGACGCA MN908947.3 98.000 150 3 0 1 150 23133 22984 1.34e-46 173
LH00211:37:222VFLLT1:1:2270:9996:21012:CGTGACGCA MN908947.3 100.000 150 0 0 1 150 22850 22999 1.65e-48 180
LH00211:37:222VFLLT1:1:2270:9987:8915:CACCGATGT MN908947.3 98.571 140 2 0 11 150 22568 22707 1.07e-43 164
LH00211:37:222VFLLT1:1:2270:9987:8915:CACCGATGT MN908947.3 97.333 150 4 0 1 150 22844 22695 5.82e-46 171
$
The line 8 with value 100.000 should appear one line earlier, on line 7 (the value 100.000 should precede 98.000). I want to sort by first column and then numerically the float values in column 3, highest to lowest. It works for float values below 100.
Thank you,
Martin
[Message part 3 (message/rfc822, inline)]
On 2024-07-17 02:28, Martin MOKREJŠ wrote:
> $ LANG=C sort -k 1 -k 3,3n -r somefile.tsv
It's not a bug, because that 'sort' isn't doing what you think it's
doing. Please try 'sort --debug' to see what's going on.
This bug report was last modified 360 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.