From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.9-12 i586) Description of problem: A simple "sort" command produces erroneous output. While RedHat's 6.1 sorts this five lines: <LI>Baese John Good <LI>B <A NAME="B"> <LI>Barnes Y. <LI>Bunny K. <LI>Babe Francis correctly as: <LI>B <A NAME="B"> <LI>Babe Francis <LI>Baese John Good <LI>Barnes Y. <LI>Bunny K. then the RedHat 7.1 (7.2) sort produces this : <LI>Babe Francis <LI>Baese John Good <LI>B <A NAME="B"> <LI>Barnes Y. <LI>Bunny K. IMHO this bug impacts each and every script, which use sort command Version-Release number of selected component (if applicable): textutils-2.0.11 - textutils-2.0.14 (textutils-2.0.10 was not tested, reported as being bad too) How reproducible: Always Steps to Reproduce: 1.take a simple text file, named "blah", eg.containing this aaa ttt aba ttt a d ada ttt aca ttt 2.sort blah Actual Results: aaa ttt aba ttt aca ttt a d ada ttt Expected Results: a d aaa ttt aba ttt aca ttt ada ttt Additional info: sort from RH < 7 produces Expected Results This is extremely severe, because all programs depending on sort produce bad outputs. Bug was found when the script for sorting author list produced wrong files (http://cccc.uochb.cas.cz/Vol/66/faidx01.html) - Download the page and try to sort it "sort faidx01.html". used for examples: textutils-2.0.11-7,textutils-2.0.14-2.src.rpm (bad) textutils-2.0a-2.src.rpm recompiled on RH7.1 (good)
DUPLICATED - setenv LC_ALL solves the problem. BUT! Non of the RH machine in our company has the LC_ALL assigned by default. So the default behavior of sort command is broken. If the creator of sort code already knows about the issue..., IMHO it is sign of stupidity. I don't think that "POSIX demands this default behavior." as bero says. *** This bug has been marked as a duplicate of 21913 ***