#!/bin/sh
currentdisk=$(df -h | tail -n 2 | head -n 1 | awk '{print $4}' | awk -F"G" '{print $1}')
if (( $(echo $currentdisk) < 10 )); then
/bin/echo "$(hostname) is almost out of disk space" | /bin/mail -s "$(hostname) CHECK DISK SPACE"
[email protected]
fi
Above script...