help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sort by bash loop command and/or sort


From: Budi
Subject: Sort by bash loop command and/or sort
Date: Sun, 16 May 2021 02:30:18 +0000

How to sort the numbers such the exponent form numeric values or the
numbers such these?

TABLE OF E.G

A     2.8 x 10-8
B     3.9 x 10-7
C      1.3 x 10-6
D      0.6-0.9 x 10-7
E      6 x 10-8

Thought trying it simple:

$ cat Table_of_eg  | sort -k2.1h

    TABLE OF E.G

D      0.6-0.9 x 10-7
C      1.3 x 10-6
A     2.8 x 10-8
B     3.9 x 10-7
E      6 x 10-8
But failed !
Should've given numbers with less (greater negative if any) exponent
first, if such is same then the less number followed by the next and
so on ordered in such rule
Help solve it. Thanks before



reply via email to

[Prev in Thread] Current Thread [Next in Thread]