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: T.0402A.P T.0402A.Z T.0402.P T.0402A.A run "cat testfile | sort" results: T.0402A.A T.0402A.P T.0402A.Z T.0402.P 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): textutils How reproducible: Always Steps to Reproduce: create a file with the contents: T.0402A.P T.0402A.Z T.0402.P T.0402A.A 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 Additional info: 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. -Ben.