Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2
tag 14318 notabug
stop
On 04/30/2013 02:37 AM, Kenneth Dickman wrote:
> Why does putting "depot" in the input file, corrupt the sort function? How
> can I get sort to operate properly?
>
> $ cat good
> bin/... //b/bin/...
> logs/... //logs/...
> ... //b/...
> $ sort good
> ... //b/...
> bin/... //b/bin/...
> logs/... //logs/...
> $ cat bad
> bin/... //depot/b/bin/...
> logs/... //depot/logs/...
> ... //depot/b/...
> $ sort bad
> bin/... //depot/b/bin/...
> ... //depot/b/...
> logs/... //depot/logs/...
> $
>
> This occurs on RedHat:
This is because in your locale, punctuation is ignored in the presence
of other sort data. I.E. '.' and ' ' are not significant to the sort.
To turn off the locale specific sorting you need to use something like:
LC_ALL=C sort ...
http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021
thanks,
Pádraig.