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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux