![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Sort files on date field | shivaastrogun | Shell Programming and Scripting | 4 | 11-17-2008 07:38 AM |
| Sort data by a DDMMYYYY field | martinezjorge | Shell Programming and Scripting | 2 | 08-25-2008 10:11 PM |
| sort columns by field | kamel.seg | Shell Programming and Scripting | 4 | 02-20-2008 06:50 AM |
| How do I specify tab as field separator for sort? | SSteve | UNIX for Dummies Questions & Answers | 8 | 04-26-2005 04:39 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Sort alpha on 1st field, numerical on 2nd field (sci notation)
I want to sort alphabetically on the first field and sort in descending numerical order on the 2nd field. With a normal "sort -r -n" it does this:
abc ||| 5e-05 ||| bla abc ||| 3 ||| ble def ||| 1 ||| abc def ||| 0.2 ||| def As you can see it ignores the fact that 5e-05 is actually 0.00005 therefore smaller than 3. The output I want would be abc ||| 3 ||| ble abc ||| 5e-05 ||| bla def ||| 1 ||| abc def ||| 0.2 ||| def |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|