Hi
I would like to sort datatable by column 2 for example. I wrote this:
awk '{a[$2>=10?$2:0$2]=$0} END {n=asorti(a,dest); for
(i=1;i<=n;i++){print dest}}' sample1.dat
It works but fails when I have negative numbers in datatable. Is there some quick solution for this?
thanks
k.
I would like to sort datatable by column 2 for example. I wrote this:
awk '{a[$2>=10?$2:0$2]=$0} END {n=asorti(a,dest); for
(i=1;i<=n;i++){print dest}}' sample1.dat
It works but fails when I have negative numbers in datatable. Is there some quick solution for this?
thanks
k.