sorting - how does linux store negative number in text files? -
i made file using ed , named numeric. content follow:
-100 -10 0 99 11 -56 12 then executed command on terminal:
sort numeric and result was:
0 -10 -100 11 12 -56 99 and of course output not @ expected!
sort want asked sort numerically (otherwise default lexigraphic sorting)
$ sort -n numbers.dat -100 -56 -10 0 11 12 99 watch out "-n" parameter (see manual)
Comments
Post a Comment