Erik de Castro Lopo <[EMAIL PROTECTED]> writes:
| I've just upgraded from RH6.0 to RH6.1. In that process, the
| textutils packages was upgraded from 1.something to 2.0 and
| I now find that the sort program behaves differently. TO check
| this I downloaded textutils-2.0.tar.gz from ftp://ftp.gnu.org
| and compiled it. This version also seems to work incorrectly.
| 
| Consider the file containing:
| 
| -------------------------------------
| 12
|  1  # First character is a space.
| 13
| -------------------------------------
| 
| Running sort on this file should (and used to) produce:
| 
| -------------------------------------
|  1  # First character is a space.
| 12
| 13
| -------------------------------------
| 
| Unfortunately, it now produces:
| 
| -------------------------------------
| 12
| 13
|  1  # First character is a space.
| -------------------------------------

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.

Reply via email to