Reputation: 1690
I have a sort command like the following,
sort -t $'\t' -k2,2nr
And a snippet of result is like
apple rind 9.983498736703696E-5 9.821524318539816E-5 1.6197441816387907E-6
barren apple 9.972712868635945E-5 1.1021253359685341E-4 -1.0485404910493957E-5
kept apple 9.95533841217251E-6 2.2368286282260593E-5 -1.2412947870088083E-5
apple become 9.954637398594461E-6 1.81625156251578E-5 -8.207878226563337E-6
straggling apple 9.953618126913039E-6 1.408307957656849E-5 -4.129461449655451E-6
apple big 9.948337410841929E-5 1.0583294657729803E-4 -6.349572468878738E-6
ibm apple 9.946711193013018E-4 8.75459103803131E-4 1.1921201549817075E-4
apple rootstock 9.93574943786854E-4 9.333210264003837E-4 6.025391738647017E-5
smaller apple 9.933352410426696E-5 1.0778732631866422E-4 -8.453802214397258E-6
cream apple 9.93011589875499E-4 9.235511228493648E-4 6.946046702613425E-5
I want to sort the second column of the table, but the result shows it doesn't work as I expected. Could anyone tell me where I am wrong?
Upvotes: 1
Views: 2099
Reputation: 799380
-n
doesn't do scientific notation. Use -g
instead.
Upvotes: 4