![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sorting a file | mtechnocrat | UNIX for Dummies Questions & Answers | 11 | 06-28-2007 04:28 AM |
| file sorting | phani_sree | Shell Programming and Scripting | 5 | 02-04-2007 11:39 PM |
| need help with sorting a file | pieman8080 | Shell Programming and Scripting | 5 | 11-21-2006 10:50 AM |
| Sorting a file | Khoomfire | Shell Programming and Scripting | 2 | 12-13-2005 04:48 AM |
| Help sorting file. | gio123bg | Shell Programming and Scripting | 3 | 12-10-2003 07:15 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sorting file
I have the file as follow:
A: 60 B: 80 C: 40 D: 11 E: 100 I want to sort the file and get the output to file as follow: E: 100 B: 80 A: 60 C: 40 D: 11 Could any one help me please? |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
# sort -nr -k2 -t":" file |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|