linux 中 sort -g的作用
001、
[b20223040323@admin2 test10]$ ls a.txt [b20223040323@admin2 test10]$ cat a.txt ## 测试数据 1.04089e-05 0.579063 1.22069e-05 1.1133e-05 0.517721 -1.10257e-05 -1.11886e-05 0.552179 0.551749 [b20223040323@admin2 test10]$ sort -n a.txt ## 按照数值排序,科学计数法无效 -1.11886e-05 -1.10257e-05 0.517721 0.551749 0.552179 0.579063 1.04089e-05 1.1133e-05 1.22069e-05 [b20223040323@admin2 test10]$ sort -g a.txt ## -g选项,实现按照通用数值排序 -1.11886e-05 -1.10257e-05 1.04089e-05 1.1133e-05 1.22069e-05 0.517721 0.551749 0.552179 0.579063
。