Bug 86002 - flaky sort command
flaky sort command
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: textutils (Show other bugs)
8.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-11 21:10 EST by Franklin Abud
Modified: 2007-04-18 12:51 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-12 04:31: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)
./sort_test should pass (240 bytes, text/plain)
2003-03-11 21:12 EST, Franklin Abud
no flags Details

  None (edit)
Description Franklin Abud 2003-03-11 21:10:20 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120
Netscape/7.01

Description of problem:
when sort command is used "sort -fd <filename>", sort should sort characters
first e.g. #no, %price then number then letters and so on and so forth.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.vi filename
adsf
dadf
fadf
adff
@dsf
1dsf
fatg
aser
%dff
reaf
ftea
gata
gfae

2 sort -fd filename

 
    

Actual Results:  
1dsf
adff
adsf
aser
dadf
%dff
@dsf
fadf
fatg
ftea
gata
gfae
reaf


Expected Results:  
%dff
@dsf
1dsf
adff
adsf
aser
dadf
fadf
fatg
ftea
gata
gfae
reaf


Additional info:

got this formula from our customer, he uses this to test the sort command.I'm
not really sure if the syntax where correct, but it work for me in Red Hat 7.2
but not in RH 7.3 and 8.0.

DEF
#hij
123
EOF

cat > /tmp/sort_test0 << EOF
#hij
123
DEF
abc
EOF

/bin/sort /tmp/sort_test1 > /tmp/sort_test2

diff /tmp/sort_test0 /tmp/sort_test2
if [ "$?" -eq 0 ]
then
        echo Sort test passed
else
        echo Sort test FAILED
        exit 1
fi
Comment 1 Franklin Abud 2003-03-11 21:12:53 EST
Created attachment 90567 [details]
./sort_test should pass
Comment 2 Tim Waugh 2003-03-12 04:31:33 EST
Nope, not unless you're in the POSIX locale.  You forgot to set LC_COLLATE=C.

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