Originally posted by: rajeshw61
#!/bin/ksh
used=0
mount=${1:-"/mountpoint"}
threshold=${2:-80}
#message="hello"
#SUBJECT="Disk Space Alert"
#EMAIL="xyz@abcinc.com"
used=`df -k $mount | grep % | awk '{print $5}' | sed 's/%//g'`
#echo "Free Space available under \"$mount\" is `expr 100 - $used`%.\n">$message
if
$used -ge $threshold ; # at this point am getting error#
then
echo "Space Utilization on \"$mount\" has exceeded the threshhold of ${threshold}%.\n" | mail -s "Disk Space Alert"
xyz@abcinc.com #/bin/mail -s "$SUBJECT" "$EMAIL" < $message
fi
*at if operator it gies "./disk.sh
14: 180533: unknown test operator" error
can any one help guys ,thanks in advance.
#AIX-Forum