本文介绍了重击:用指数对数字进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用这样的数值对一个文件进行排序:

I was trying to sort one file with numeric values like this:

414e-05
435e-05
0.5361
0.7278
0.1341
0.9592
0.2664

通过排序,除具有指数的数字外,所有数字均被排序,是否有某种方法可以使排序函数计算该表达式?

With sort all the numers get sorted except for the ones with the exponent, is there some way for sort function to evaluate this expression?

推荐答案

如果您的sort命令版本足够新,则它应支持选项(或(如果您希望长期选择).信息手册中对此进行了描述:

If your version of the sort command is new enough, it should support the option (or if you like your options long). It is described like this in the info manual:

这篇关于重击:用指数对数字进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 16:48
查看更多