It's actually sorting correctly, if a period '.' comes after
letters of the alphabet.  In your example, 'b' precedes
'.', so ab.a is first.  And 'c' precedes 'z', so the rest is
correct.

We all agree 'a' comes before 'b', but does 'a' come
before '.' ?  This depends on the locale, and specifically
on LC_COLLATE.  For example:

---snip---
$ export LC_COLLATE=en_US 
$ sort sample
ab.a
a.c
a.z
$ export LC_COLLATE=C
$ sort sample
a.c
a.z
ab.a
---snip---


-David


Reg. Charney wrote:

>I believe that sort in coreutils v5.2.1 has a basic bug in it - it seems to treat the 
>period (.) as a non-existant character. Here is an example:
>
>$cat sample
>a.z
>ab.a
>a.c
>
>$sort sample
>ab.a
>a.c
>a.z
>
>This would be correct if we were to ignore the periods - the sort order would be aba, 
>ac, az. I believe the order should be a.c, a.z, ab.a
>
>Reg. Charney
>  
>



_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to