David Duffy <[EMAIL PROTECTED]> writes:
| I'm not sure if this is a bug or a peculiarity of my local collation
| sequence (though I can't see how, LC_COLLATE="en"). When sorting the
| following two files using sort (GNU textutils) 2.0 (or 1.22) on a i686
| running Mandrake 7.0, I obtain:
|
| sort first
| ----- file the first -----
| 10 x x
| 11 x x
| 1 x x
| 20 x x
| 2 x x
| -----
|
| sort second
| ----- file the second -----
| 10 1 1
| 1 1 1
| 11 1 1
| 20 1 1
| 2 1 1
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
[or LC_COLLATE in your case]
# 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.