#!/bin/bash
THRESHOLD=20
EMAIL=x@xyz.com
#PART=yourdiskpart
PART=/
PART=/root
PART=/home
USE=`df -hP |grep $PART | awk '{ print $5 }' | cut -d'%' -f1`
if [ $USE -gt $THRESHOLD ]; then
echo "Percent Used: $USE" | mail -s "Disk Usage Rate " anthony@cbinet.net
#mail -s "Disk Usage Rate " anthony@cbinet.net << EOF 
#This is your disk usage. Used: $USE%
#EOF
fi
