sort wierdness




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



Relevant Pages

  • Re: OT: Youth In Asia
    ... What's the explanation for that do you think? ... Aside from some sort ... of pathological imbecility, the only solutions appear to be... ...
    (rec.music.beatles)
  • Re: The Fall
    ... awed by a glorious sunset or a magnificent landscape. ... I doubt there's a *simple* explanation; is there any reason why the ... It doesn't seem difficult to concoct guesses as to the sort of ... the area has been cleared of dangerous wild animals; ...
    (uk.religion.christian)
  • Re: Plate techtonics and asteroid hits
    ... Any sort of explanation which is an understandable explanation. ... the mantle disappearing down the gurgler ... And why would the crust ride over the mantle? ...
    (sci.geo.geology)
  • Re: Putty & SSH
    ... > putty is a beast of a totally different sort. ... I "like" his explanation ...
    (FreeBSD-Security)