Red Hat Bugzilla – Bug 148892
sort command does not work correctly
Last modified: 2007-11-30 17:06:54 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Description of problem:
file with 4 lines of content:
run "cat testfile | sort" results:
The last line "T.0402.P" should be first.
Also tried this with "sort -d" which gives same results.
Test on RHAS3 with "coreutils" gives correct output.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
create a file with the contents:
run "sort <filename>" or "sort -d <filename>"
incorrect output results.
Try the same steps on an RHAS3 box with coreutils and it works as expected and documented.
Actual Results: Incorrect output was given.
Expected Results: The last line of output should have been the first line (according to the sort documentation). It works fine on RHAS3, but not on RHAS2.1
This is a problem when we have systems with scripts that we are migrating from HP or SUN systems, or when we try to upgrade from broken systems (RH7.2 and RHAS2.1) to a non-broken system and the results are inconsistent.
We have billing and accounting systems that are being affected!
This is the correct sorting order for the locale you are using. To use C locale
sorting order, use 'LC_COLLATE=C sort' or export LC_COLLATE=C in the environment.
Thanks Mr. Waugh, sorry for the disturbance. I thought for sure this was
impossible that we hadn't noticed this before.