Bug 206456

Summary: Sort does not always sort right.
Product: [Fedora] Fedora Reporter: Ralf Ertzinger <redhat-bugzilla>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: meyering
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-26 16:07:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ralf Ertzinger 2006-09-14 14:31:46 UTC
Description of problem:
Lines starting with an asterisk sometimes get sorted strangely:

$ echo -e "a\nc\n*\nb" | sort
*
a
b
c

This is the expected behaviour. Now a different string:

$ echo -e "eutin: lall\nfhansen: keks\n*: :fail:" | sort
eutin: lall
*: :fail:
fhansen: keks

The line starting with * is put between e and f, strange enough.

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=


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

How reproducible:
Sometimes (depends on text to be sorted)

Steps to Reproduce:
1. Sort a text containing lines starting with *
2.
3.
  
Actual results:
Sometimes * gets sorted between e and f

Expected results:
Lines with * at the beginning (or the end)

Additional info:
Also happens on CentOS 4.4 with coreutils-5.2.1-31.4

Comment 1 Tim Waugh 2006-09-26 16:07:42 UTC

*** This bug has been marked as a duplicate of 144541 ***