2
Hello need to do a Sort of my file, I have 3 columns: the first would be the chromosome (1,2,3,4,5.28,W,Z), the second would be the position on this chromosome and the last would be values.
When I do the sort -n
I have as results the chromosomes drawn in 10,11,12,13.... but I want the order: 1,2,3...28,W,Z. The second column would like the values from the smallest to the largest. The third column does not matter.
Example of my input
10 247 0.02
10 445 0.04
10 447 0.08
11 81 0.04
11 91 0.01
1 102 0.03
1 105 0.05
What would be the best command?
Thank you so much Bruno! I hadn’t tried the -V option. It’s exactly what I needed!
– Alex
You’re welcome. I’m glad it worked!
– bruno