Hi,
Please help with this problem. Somehow does not work for me.
test.txt
CHR SNP BP A1 C_A C_U A2 CHISQ P OR
19 rs10401969 19268718 C 222 890 T 0.03462 0.8524 0.9857
1 rs10873889 76734548 G 934 3811 A 0.5325 0.4656 0.9691
1 rs11589059 214196749 C 271 1084 T 0.01928 0.8896 0.9902
I want to sort on Col CHISQ ($8) keeping the header intact.
I used this code from another thread
gawk 'NR==1; {if(NR > 1) {print $0 | "sort -t '\t' -nk 8,8"}}' test.txt
However it does not work for me.
Thanks