[EMAIL PROTECTED] wrote: > I have found what appears to be a bug in gnu sort 5.2.1, under Linux. > The attached file is in UNIX format (no carriage returns). It is -not- > in sorted order. Running 'sort sort.txt' produces output in the same > order, ie unsorted. If you have trouble reproducing this, please get > back to me and I'll provide complete environmental information. Thanks > for your attention.
Thank you for your report. But the file sorts fine for me. I cannot reproduce your problem. But your report matches a very common signature of other reports. This is almost certainly due use of a non-standard locale. For example in the en_US locale setting (e.g. LANG=en_US) the collating sequence of letters is aAbBcC...zZ and [a-z] matches [a-zA-X] in the C or POSIX locale. Also case is folded and punctuation is ignored. Because punctuation is ingored in the locale this makes it appear as if the file is not being sorted correctly when in actuality it is being sorted correctly according to the chosen locale. Try this: export LANG=C sort yourfile See this reference: http://www.gnu.org/software/coreutils/faq/ Look for "Sort does not sort in normal order!" Bob _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
