Entering edit mode
5.1 years ago
Shicheng Guo
★
9.6k
Hi All,
I want to sort P-values in bash
with sort
command. The P-values are as the following:
A 1.14e-06
B 4.35e-05
C 0.5361
D 0.7278
When you use sort -k2n,2 input.txt
, the result is as the following:
C 0.5361
D 0.7278
A 1.14e-06
B 4.35e-05
I tried sort -gk2n,2 input.txt
and not working neither.
Anyone can share a correct bash or Perl
one-line command to sort them correctly.
Thanks.
interesting. remove
n
numeric works. and works very well