We use this in a script. YMMV:
touch /tmp/mail.txt
USEPERCENT=`df / | egrep / | gawk '{print $5}' | sed s/%//` echo "${USEPERCENT}" if [ ${USEPERCENT} > 75 ] then mail you@xxxxxxxxxxxxxx -s "Warning, / is at ${USEPERCENT}" < /tmp/mail.txt rm /tmp/mail.txt fi Rob
|