Checking the space for /archlog mount point script

I have the below shell script which is checking /archlog mount point space on cappire(solaris 10) server. When the space usage is above 80% it should e-mail. When i tested this script it is working as expected.

#!/usr/bin/ksh
export MAIL_LIST="tlr.voora@zamn.com"
export ARCH_STATUS=`df -k /archlog | awk '{ print $5 }' | grep -v Use%`
echo $ARCH_STATUS
if [[ $ARCH_STATUS > 80% ]]
then echo "archive destination is $ARCH_STATUS full please contact DBA"
echo "archive destination /archlog is $ARCH_STATUS full on Cappire." | mailx -s "archive destination on cappire is $ARCH_STATUS full" $MAIL_LIST
else
exit 1 
fi

exit

When i scheduled a cron job it is giving different result. Right now /archlog is 6%, it should exit without e-mailing anything. But, i am getting the below e-mail from cappire server which is strange.

subject:archive destination on cappire is capacity
below is the e-mail content.
6% full
Content-Length: 62

archive destination /archlog is capacity 6% full on Cappire.

Please help me in resolving this issue - why i am getting the above e-mail, i should not get any e-mail with the logic.

Is there any issue with the cron. Please let me know.

Sometimes formatting of thngs like ls, df changes without a tty. You might try something like this to achieve the same end:

$ df -k .
/home                                       : 19971944 total allocated Kb
                                                   1043584 free allocated Kb
                                                  18928360 used allocated Kb
                                                        94 % allocation used
$
 
df -k /archlog | grep -c ' [ 1-8][0-9] % allocation used' | read BELOW_90

Send the whole df in the email.