bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in Linux /bin/sort (textutils-2.0e-8, RedHat 7.0)


From: Jim Meyering
Subject: Re: bug in Linux /bin/sort (textutils-2.0e-8, RedHat 7.0)
Date: 26 Apr 2001 11:53:02 +0200
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.0.103

This is a common problem.
Here's the canned reply:

------------------
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 or your vendor have probably set environment
variables like LANG, LC_ALL, or LANGUAGE to en_US).

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 sort will then work the way you expect.
-----------

BTW, in recent textutils test releases, sort --help output
includes this:

  *** WARNING ***
  This version of sort honors the locale settings in your environment.
  For example, if you set one of the LANG or LC_ALL environment variables
  to `en_US', then sort will work very differently than most people expect.
  If that's not what you want, then set LC_ALL to POSIX in your environment.

Brent Thompson <address@hidden> wrote:
| I have a file with several instances of same pair of slightly different
| lines, e.g.:
|
| '^string-ends-with-alpha'
| '^string-ends-with-alpha '
| '^string-ends-with-alpha'
| '^string-ends-with-alpha '
| '^string-ends-with-alpha'
| '^string-ends-with-alpha '
| '^string-ends-with-alpha'
| '^string-ends-with-alpha '
|
| On a RedHat 7.0 system with textutils-2.0e-8 installed:
|
| 'sort file' returns unchanged list, despite many out-of-order lines.
| 'sort -u file' returns unchanged list, despite many identical duplicate lines.
|
| Shouldn't 'sort file' return something like this?:
|
| '^string-ends-with-alpha '
| '^string-ends-with-alpha '
| '^string-ends-with-alpha '
| '^string-ends-with-alpha '
| '^string-ends-with-alpha'
| '^string-ends-with-alpha'
| '^string-ends-with-alpha'
| '^string-ends-with-alpha'
|
| and 'sort -u file' return something like this?:
|
| '^string-ends-with-alpha '
| '^string-ends-with-alpha'
...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]