GNU bug report logs -
#23951
sort -k1.4,1.6n -u HAVE BUGS!!!
Previous Next
Reported by: David Pan <nanospeed <at> 139.com>
Date: Tue, 12 Jul 2016 03:15:01 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello,
> On Jul 11, 2016, at 21:38, David Pan <nanospeed <at> 139.com> wrote:
>
> It seems that I find a bug when using the command:
>
> sort -k1.4n -u
> please refer to the attachment for detail .
You have not indicated exactly what is the suspected incorrect output.
May I ask you to detail what is the output you expected vs the output you got? (i.e. in which command you think the bug is?) Also, in the subject line you've listed "-k1.4,1.6n", but I do not see such invocation in the attached file.
To help troubleshoot sort-related issues, recent versions of gnu sort support a new option "--debug" which prints additional information about the keys being compared.
It would be useful to attach the output of such command, for example:
======
$ sort --debug -k1.4n -u aa
sort: using ‘en_US.UTF-8’ sorting rules
sort: leading blanks are significant in key 1; consider also specifying 'b'
sort: key 1 is numeric and spans multiple fields
c3a1.ecld.com
__
c3m2.ecld.com
__
c3s15.ecld.com
___
c3s16.ecld.com
___
c3s17.ecld.com
___
c3s18.ecld.com
___
c3s19.ecld.com
___
c3s20.ecld.com
___
c3s21.ecld.com
___
c3s25.ecld.com
___
======
regards,
-assaf
P.S.
If you do test a newer version of coreutils, please be sure to use version 8.19 or newer, as it contains a fix for a "sort -u" bug which was introduced in 8.6 ( http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=eb3f5b3b3de8c6ca005a701f09bff43d778aece7 ).
This bug report was last modified 6 years and 208 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.