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

[ale] sort order



The installfest is a big success for me.  I ended up not being able to
solve anyone else's problems, but three of us spent an hour tracking
down the cause of sort order changing on recent linuxen.

If you are running a recent RedHat or Mandrake, you may have noticed
that the output of "ls -s" has changed.  It used to be that if you
have files named 'aa', 'Aa', and '.ab' this would happen:

# ls
.ab
Ba
aa

but now

# ls
aa
.ab
Ba

ick ugh.  Lot's of scripts are now broken.

It turns out this is a feature.  According to the POSIX standard, sort
order is now determined through some magic combination of the
LC_LOCALE and LC_COLLATE environment variables.  

After even more work on google, I came up with the solution:  Set the
LC_COLLATE variable to POSIX and export it.

You can do this in your .bash_profile, or in /etc/profile to change it
for all your users.

A special thanks to Steve DuChene and Solomon Peachy for help.

--Michael

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.