tag 13538 + notabug close 13538 stop On 01/24/2013 07:16 AM, XU Jian H wrote: > $ cat log > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src/res > /VOBS/MediaGW/gw/src/res > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src@@/m > /VOBS/MediaGW/gw/src@@/m > /VOBS/MediaGW/gw/src@@/m > > $ ~/bin/sort --version > sort (GNU coreutils) 8.20 > Copyright (C) 2012 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > Written by Mike Haertel and Paul Eggert. > > $ ~/bin/sort log > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src@@/m > /VOBS/MediaGW/gw/src@@/m > /VOBS/MediaGW/gw/src@@/m > /VOBS/MediaGW/gw/src/res > /VOBS/MediaGW/gw/src/res > > But I expect the result should be: > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src/cha > /VOBS/MediaGW/gw/src/res > /VOBS/MediaGW/gw/src/res > /VOBS/MediaGW/gw/src@@/m > /VOBS/MediaGW/gw/src@@/m > /VOBS/MediaGW/gw/src@@/m
Hi xujian, I didn't know Alcatel is also (still) using ClearCase ;-) Re. the problem: The sort order is dependent on your locale setting. E.g. with LC_ALL=C, the result will be as you expected while with LC_ALL=en_US.UTF-8, the result is the one you got. $ LANG=C src/sort /tmp/x /VOBS/MediaGW/gw/src/cha /VOBS/MediaGW/gw/src/cha /VOBS/MediaGW/gw/src/cha /VOBS/MediaGW/gw/src/cha /VOBS/MediaGW/gw/src/res /VOBS/MediaGW/gw/src/res /VOBS/MediaGW/gw/src@@/m /VOBS/MediaGW/gw/src@@/m /VOBS/MediaGW/gw/src@@/m More on this: http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021 Therefore, I'm marking this bug as done. Have a nice day, Berny
