linux排序对我不起作用

时间:2013-02-09 02:50:22

标签: bash shell unix sorting sh

我有一个类似以下的排序命令,

sort -t $'\t' -k2,2nr

结果片段就像

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

我想对表的第二列进行排序,但结果显示它无法正常工作。 谁能告诉我哪里错了?

1 个答案:

答案 0 :(得分:4)

-n不做科学记数法。请改用-g