GNU bug report logs -
#22084
Potential Bug in sort -r
Previous Next
Reported by: Adrià Rovira <adria.rovira <at> upc.edu>
Date: Thu, 3 Dec 2015 16:51:02 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Dear GNU,
I am using the sort command in (GNU coreutils) version 8.13
I noticed the reverse option is not correctly applied if it has to sort by
more than one column.
This behaviour is corrected by forcing again the type of sort.
This happens with -n and -g.
Example:
echo -e "930 7.83\n930 77.52\n930 54.09" | sort -n -k1 -k2r
930 7.83
930 77.52
930 54.09
echo -e "930 7.83\n930 77.52\n930 54.09" | sort -n -k1 -k2rn
930 77.52
930 54.09
930 7.83
Kind Regards,
Adrià and Deimos
--------------------------------------------------------
o o o | Adrià Rovira Garcia
o o o | Research group of Astronomy and GEomatics (gAGE)
o o o | Universitat Politècnica de Catalunya (UPC)
--------------------------------------------------------
gAGE / UPC
Departament de Matemàtiques
C/. Jordi Girona 1-3
Campus Nord UPC
Building C3, Office 211
08034 Barcelona, Spain
Tel:+34 93 401 25 31
Fax:+34 93 401 59 81
http://www.gage.upc.edu
[Message part 2 (text/html, inline)]
This bug report was last modified 9 years and 167 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.