Hi All,
I'm sure this is pretty obvious but I obviously can't see the wood for the trees!
I have a text file (index.txt) such as this ->
csh 99
vi 155
csh 123
pipe 101
emacs 163
socket 415
pipe 23
and I want to sort it on the the first field alphabetically and then on the second field numerically. So I tried using
sort +0 -1 +1 -2n index.txt
I would have thought this would do it but the numbers are always in reverse order..like this
csh 123
csh 99
emacs 163
pipe 101
pipe 23
socket 415
vi 155
why on earth is it not coming out as (which is what I want)
csh 99
csh 123
emacs 163
pipe 23
pipe 101
socket 415
vi 155
Many thanks for any insight
James