The UNIX and Linux Forums  

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




Thread: check space !!!
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-09-2005
kamlesh_p kamlesh_p is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 9
check space !!!

The have written the below script :-
============================

SPACE=`bdf /DATA_TRANSFER|awk '{print $4}' |grep "%"`
TEST="96%"
if [ "$SPACE" < "$TEST" ]
then
echo "Continue ....."
sleep 2
else
echo " Current space for DATA_TRANSFER is less than 02 %"
echo " Pls clear space and than continue ....."
sleep 3
exit 1
fi

but after execution it give's following error:-
================================
+ ./checkspace[4]: 96%: cannot open
I am running the same on HP-UX 11.11 version and in ksh shell.
Can you assist in resolving the same ?