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

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -