![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to reduce swapped column in "vmstat" | unitipon | SUN Solaris | 2 | 05-14-2008 08:18 PM |
| Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" | iBot | UNIX and Linux RSS News | 0 | 01-04-2008 12:00 PM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-19-2007 10:52 PM |
| Debian: doubt in "top" %CPU and "sar" output | jaduks | Linux | 0 | 09-12-2007 05:05 AM |
| Sorting problem "sort -k 16,29 sample.txt > output.txt" | ganapati | Shell Programming and Scripting | 3 | 08-01-2006 02:55 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Sorting "ls" output on more than 1 column
I would sort the "ls" output : on the 1st column then on the nineth :
ls -al |sort -k1,1 -k9,9r this doesn't work ? Anybody have an idea ? regards Christian |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You need spaces between the -k and the field_start,field_end portion
ls -al |sort -k 1,1 -k 9,9r If you are thinking that it isn't working, check again. It may be the first column (the file permissions) that makes it look like the last column (file name) isn't sorted, but it is. Last edited by RTM; 09-20-2005 at 04:42 AM. |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|