Michael McFarland <[EMAIL PROTECTED]> writes:
|    Sorting the following text with sort 2.0 seems to
| produce incorrect results:
|   Input:
| 1.2.345.600
| 1.2.34.500
| 1.2.3.456
| 1.2.456.700
| 1.2.356.8
| 1.2.4.5
|   Output:
| 1.2.34.500
| 1.2.3.456
| 1.2.345.600
| 1.2.356.8
| 1.2.4.5
| 1.2.456.700
|    Using larger sets of similar data illustrates the
| phenomenon better.  Is this a known bug, or am I
| misusing the program?

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