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 -->
  #2 (permalink)  
Old 04-28-2005
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
  
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 637
(1) needs backticks --- character under ~ (tilde) on your keyboard ...

Code:
#!/bin/ksh

DFR=`df -g filesystempath|grep filesystem|awk '{print $4}'`

echo $DFR

(2) needs to be properly formatted ... and use backticks ... and use right test syntax ...

Code:
#!/bin/ksh

DFR=`df -g filesystempath|grep filesystem|awk '{print $4}'`

if [ $DFR -gt 90 ] 
then 
    echo "True" 
else 
    echo "False" 
fi 
#checking if its greater than 90%