GNU bug report logs -
#69901
(echo a; echo b) | sort -nu looses some data
Previous Next
Reported by: Rafal Maszkowski <rzm <at> icm.edu.pl>
Date: Tue, 19 Mar 2024 18:26:04 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Sort with -n and -u options works correctly for numbers:
(echo 10; echo 11) | sort -nu
10
11
but looses data when used with non-numbers:
(echo a; echo b) | sort -nu
a
(echo 1.0; echo 1.1) | sort -nu
1.0
I have tested this on versions 8.32 and 9.2 default for Debian 11 and
12, and additionally compiled version 9.4. The --debug option advised in
README does not say anything helpful:
(echo a; echo b) | sort --debug -nu
sort: text ordering performed using simple byte comparison
a
^ no match for key
R.
--
„Walczy on z całym zapamiętaniem przeciwko intelektowi” - z akt personalnych prof. A. Baeumlera
This bug report was last modified 1 year and 97 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.