The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
not getting the output properly pmrajesh21 SUN Solaris 0 04-16-2008 11:43 AM
Output in my shell isn't showing properly. satyakide Shell Programming and Scripting 7 04-01-2008 11:05 AM
sort output funksen Shell Programming and Scripting 9 01-14-2008 04:40 AM
how to sort and arrange an output llsmr777 UNIX for Dummies Questions & Answers 10 11-12-2007 09:39 PM
How to output the results of the AT command - properly! SpanishPassion UNIX for Dummies Questions & Answers 4 12-04-2005 10:27 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-04-2008
shew01 shew01 is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 41
Quote:
Originally Posted by System Shock View Post
..well, obviously you are running at the very least a different version of sort because it works for me; you didn't specify an OS or sort version. In any case, it still stands that a quick look at the man pages of whatever OS and sort version you are using would've given you the answer.
I'm not interested in having a posting war with you. Please just ignore my posts.
  #2 (permalink)  
Old 06-04-2008
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,926
Or:
if perl is acceptable:


Code:
df -k | 
  perl -ane'
    /%/ and push @x,$F[4];
    print join "\n" , reverse sort { $a <=> $b } @x 
if eof'

Otherwise:


Code:
df -k |awk '1<NR&&NF>1{print $5}'|sort -nr

  #3 (permalink)  
Old 06-04-2008
shew01 shew01 is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 41
radoulov,

Quote:
Originally Posted by radoulov View Post
Or:
if perl is acceptable:


Code:
df -k | 
  perl -ane'
    /%/ and push @x,$F[4];
    print join "\n" , reverse sort { $a <=> $b } @x 
if eof'

Otherwise:


Code:
df -k |awk '1<NR&&NF>1{print $5}'|sort -nr
This works for me too. Thanks!
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:49 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0