Hi,
I am using UBUNTU 12.04.
I have a dataset as follows:
Column#1 Column#2 Column#3 .... Column#50
1 154878
1 145145
2 189565
2 454121
. .
. .
. .
22 124579
My questions:
-
I want to divide all the values in column#3 by 1000000 and print all the file. I know doing it by writing #awk'{print $1,$2,$3/1000000,$4....$50}' but as it takes too much time, I wanted to see whether there is any more efficient way?
-
I want to order all the values in column#3 according to column#2, that is first it puts all the values in order for all 1s in column 2, then do it for all the 2s and so on. So, the output looks like this:
Column#1 Column#2 Column#3 .... Column#50
1 145145
1 154878
2 145412
2 189565
. .
. .
. .
22 124579
Thank you very much.