Bug 24625 - textutils/sort (is broken again)
Summary: textutils/sort (is broken again)
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: textutils   
(Show other bugs)
Version: 6.2
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-22 18:25 UTC by Need Real Name
Modified: 2007-04-18 16:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-22 18:56:33 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Need Real Name 2001-01-22 18:25:22 UTC
( 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 18:56:30 UTC
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 18:57:15 UTC
Closing as NOTABUG.

Comment 3 Need Real Name 2001-01-22 20:30:10 UTC
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.