Bug 6569 - sort util broken
sort util broken
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: textutils (Show other bugs)
6.1
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Preston Brown
:
: 6762 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-10-31 10:18 EST by hajic
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-01-13 22:46:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description hajic 1999-10-31 10:18:28 EST
sort does not sort correctly.

sort this using the 5.2 sort and the "new" 6.1 sort:

AFD7#@
AFD71@
AFD71@-6
AFD71A
AFD71A-6
AFD7#@-6
AFP1#@
AFP11@
AFP11@-6
AFP11A

and you get different results.

Environment:

Linux "out-of-the-box" RH 6.1
tcsh 6.08 (from RH 6.1, unmodified), no locale set
(LC_ALL=en_US; I also tried with LC_ALL unset, same problem;
yes I know for data like the above it should not make
any difference).

After running this ('file' is the above 10-line file):

sort.52 file > file.52.srt  # using RH's 5.2. sort
sort.61 file > file.61.srt  # RH 6.1 sort
diff file.52.srt file.61.srt

I got this:

2d1
< AFD7#@-6
6a6
> AFD7#@-6


-- Jan Hajic
Comment 1 hajic 1999-11-01 08:08:59 EST
After getting a reply (and suggestion) from Jim Meyering
<meyering@ascend.com> (after sending a copy of the bug report to
bug-textutils@gnu.org), I tried unsetenv LANG and it helped.
(Unlike unsetenv LC_ALL, which had no effect.) Therefore your en_US
tables (or possibly other as well!) must be corrupted, since they
should not influence the sorting of # in any way, right?

-- Jan Hajic
Comment 2 Preston Brown 2000-01-13 22:45:59 EST
*** Bug 6762 has been marked as a duplicate of this bug. ***
Comment 3 Preston Brown 2000-01-13 22:46:59 EST
sort is correctly following the LC_COLLATE settings for en_US.  if you want
POSIX behaviour, you have to request it explicitly (unset LANG/LC_COLLATE, or
set LC_COLLATE=C).

Note You need to log in before you can comment on or make changes to this bug.