David Gregg <[EMAIL PROTECTED]> [2002-08-26 14:23:39 +0100]: > I'm using: > sort (textutils) 2.0.21 [...] > In other words, sort thinks that this is a correct sorting of the file. > It is not. The correct output should be: [...] > If I had typed "sort -d bob" (-d specifies to ignore all characters except > alphanumeric ones) then this would be the correct output.
Use the 'locale' command to print out what sorting order you have configured in your environment. If it does not say "C" or "POSIX" then you have configured a non-standard sorting order. In which case it is not a bug in sort but behavior which is specifically required. Most generally reported is that your vendor set LANG for you to en_US because they think you like it that way. If you disagree then you might consider filing a bug report with them. Here is a standard reply. Bob Please check out the FAQ section on sort. http://www.gnu.org/software/fileutils/doc/faq/#Sort%20does%20not%20sorting%20i +n%20normal%20order! This is due to the fact that you or your vendor have set environment variables that direct the program to use locale specific sorting tables which do not sort as you expect. You or your vendor have probably set environment variables like LANG, LC_ALL, or LANG to en_US. Use the 'locale' program to display your current settings. Unset them, and then set LC_ALL to POSIX. # If you use bash or some other Bourne-based shell, export LC_ALL=POSIX # If you use a C-shell, setenv LC_ALL POSIX and it will then work the way you expect because it will use a different set of tables. See the standards documentation for more information on the locale variables with regards to sort. http://www.unix-systems.org/single_unix_specification_v2/xcu/sort.html _______________________________________________ Bug-textutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-textutils