Bug 24625 - textutils/sort (is broken again)
textutils/sort (is broken again)
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: textutils (Show other bugs)
6.2
All Linux
medium Severity high
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-22 13:25 EST by Need Real Name
Modified: 2007-04-18 12:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-22 13:56:33 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 Need Real Name 2001-01-22 13:25:22 EST
( I just can't believe that this happens again )
This example text won't sort as expected:

  ./i486-unknown-linux-gnu/lib/crtn.o
  ./i486-unknown-linux-gnu/lib/ldscripts/elf_i386.x
  ./i486-unknown-linux-gnu/lib/ld-linux.so.1
  ./i486-unknown-linux-gnu/lib/libBrokenLocale.so.1
  ./i486-unknown-linux-gnu/lib/ld.so
  ./i486-unknown-linux-gnu/lib/libc-2.1.3.so

It is sorted this way by textutils-2.0e-8 (and 2.0e-6)

  ./i486-unknown-linux-gnu/lib/crtn.o
  ./i486-unknown-linux-gnu/lib/ld-linux.so.1
  ./i486-unknown-linux-gnu/lib/ldscripts/elf_i386.x
  ./i486-unknown-linux-gnu/lib/ld.so
  ./i486-unknown-linux-gnu/lib/libBrokenLocale.so.1
  ./i486-unknown-linux-gnu/lib/libc-2.1.3.so

And here is what Slackware 3.1, Solaris 2.51, Solaris 8 and
RHL-62 (with  textutils-2.0a-2) thinks it should be:

  ./i486-unknown-linux-gnu/lib/crtn.o
  ./i486-unknown-linux-gnu/lib/ld-linux.so.1
  ./i486-unknown-linux-gnu/lib/ld.so
  ./i486-unknown-linux-gnu/lib/ldscripts/elf_i386.x
  ./i486-unknown-linux-gnu/lib/libBrokenLocale.so.1
  ./i486-unknown-linux-gnu/lib/libc-2.1.3.so
Comment 1 Derek Tattersall 2001-01-22 13:56:30 EST
Because of the locale support, you need to set LC_ALL="C" or LC_COLLATE="C" 
before sorting.  Then your sort will come out in the expected fashion.
Comment 2 Derek Tattersall 2001-01-22 13:57:15 EST
Closing as NOTABUG.
Comment 3 Need Real Name 2001-01-22 15:30:10 EST
I think that default behaviour should be same
as if LC_ALL or LC_COLLATE is set to "C" !!
Anyway, environment (locale)variables should have
always some reasonable "internal" defaults, if
these variables are left unset externally.

BTW. sort "works" on Solaris even if there isn't
  any locale-variable set.

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