The UNIX and Linux Forums  

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 -->
  #5 (permalink)  
Old 10-16-2008
danmero danmero is offline Forum Advisor  
  
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 1,441

Code:
df -kh |       \  # Pipe the output of df to awk
awk '             # Start the awk script
/\/mnt/        \  # Grep for pattern(first condition)
&&             \  # add a second condition (and)
int($5) >= 85  \  # Check if integer of $5 is greater that 85(second condition) 
'                 # End awk script