The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-04-2008
System Shock's Avatar
System Shock System Shock is offline Forum Advisor  
Registered User
  
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 521
The output you are getting is not "incorrect". It is actually correct with the flags you are giving sort.
You have to tell sort that you are sorting numbers and not text.
Code:
:> df -k | grep / | awk '{print $5}' | sort -gr
100%
7%
2%
0%
0%
A quick look at the man pages would've given you the answer.