Bug 1374678

Summary: sort fails to sort in right order
Product: [Fedora] Fedora Reporter: Ray Holme <rayholme>
Component: coreutilsAssignee: Kamil Dudka <kdudka>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 24CC: admiller, jamartis, kdudka, kzak, ooprala, ovasik, p, terje.rosten, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-11 17:54:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ray Holme 2016-09-09 12:02:02 UTC
Description of problem: In some cases the sort sorts incorrectly


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


How reproducible: 100%


Steps to Reproduce:
1.(echo "./Invoice.m4"; echo "./Invoice.java"; echo "./InvoiceLine.m4"; echo "./InvoiceLine.java") | sort 

2.
3.

Actual results:
./Invoice.java
./InvoiceLine.java
./InvoiceLine.m4
./Invoice.m4


Expected results:
./Invoice.java
./Invoice.m4
./InvoiceLine.java
./InvoiceLine.m4



Additional info: Curious issue, not critical but I am sure it shows up other places. And NO, I am not sure what component to file this against.

Comment 1 Ray Holme 2016-09-09 13:56:36 UTC
For the record, I have access to other Linux and Unix boxes:

  Ubuntu, Suse and Fedora are all consistently WRONG

Only Solaris did this command right.

Comment 2 Terje Røsten 2016-09-11 17:05:05 UTC
Hi Ray,

> And NO, I am not sure what component to file this against.

You can use trick:

$ rpm -qf $(which sort)

coreutils-8.25-6.fc24.x86_64

Comment 3 Ray Holme 2016-09-11 17:13:09 UTC
Thanks, duly noted and thanks again for re-directing where it should be filed.

Comment 4 Pádraig Brady 2016-09-11 17:54:54 UTC
For your locale the '.' is ignored, thus causing the confusion.
You can make the '.' significant with --version-sort or by using `LC_ALL=C sort`

Comment 5 Ray Holme 2016-09-11 20:18:53 UTC
Wow, OK - that goes against everything I know about English and the way the Dictionary is done!!!!!

But your change works.