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?
If you don't have
sort -g
, an alternative you can get isscisort
.If your version of the sort command is new enough, it should support the -g option (or --general-numeric-sort) if you like your options long). It is described like this in the info manual: