sort wierdness

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

 



   I am seeing sort treat '@' specially; in particular, it wanders around 
the sort order depending upon the rest of the input line.  Anyone have an 
explanation?  I guess it's something to do with locale, but the input 
strings affecting it as well make no sense to me.

$ locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=


sort input:
Abbot',              'COMP
CobraP',             'COMP
CobraU',             'COMP
@',                  'COMP
CTM',                'COMP
Jobby',              'COMP

gives:
Abbot',              'COMP
CobraP',             'COMP
CobraU',             'COMP
@',                  'COMP
CTM',                'COMP
Jobby',              'COMP


sort input:
Abbot',              'C
CobraP',             'C
CobraU',             'C
@',                  'C
CTM',                'C
Jobby',              'C

gives:
Abbot',              'C
@',                  'C
CobraP',             'C
CobraU',             'C
CTM',                'C
Jobby',              'C


sort input:
Abbot',
@',
CobraP',
CobraU',
CTM',
Jobby',

gives:
@',
Abbot',
CobraP',
CobraU',
CTM',
Jobby',


   'LC_ALL=C sort' gives that last order, nomatter the input, as I'd expect.

-- 
[neil@fnx ~]# rm -f .signature
[neil@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil@fnx ~]# exit
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux