Corrin Lakeland <[EMAIL PROTECTED]> writes:
| Gnu sort (version 2.0 by Mike Haertel) does not have the ability to sort
| the key '-', it appears to skip over it whenever it appears in the input
| regardless of command line options. This differs from other versions of
| sort where treating all keys as valid is the default behaviour which can
| be turned off using say -d.
|
| For example, I want to sort the file:
| -NONE-
| *
| NNS
|
| Using gnu sort I get
| *
| NNS
| -NONE-
|
| Whereas using Sun's sort I get the correct output:
| *
| -NONE-
| NNS
|
| This is significant because it means sort's behaviour is not compatable
| with strcmp.
I think I know what's happening. Here's the form letter:
---------
You are using the version of sort that comes with textutils-2.0
or newer and have reported a problem whereby it is sorting in
some non-ASCII order.
That is due not to a bug in sort, but to the fact that you have
set environment variables that direct sort to use improper locale-
specific tables (you probably have LC_ALL set to en_US).
You should 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 then sort will work the way you expect.