#!/usr/bin/ksh
# Script to check disks for fullness
df | sed 's/%//g' | awk '
NR > 1 {
		if ( $5 > 70 && $1 != "/proc" )
		{
			printf "%s is %s%% full!\n",$1,$5
		}
	}
' > /tmp/check_disks${$}
# if we found disks that were full send mail
if [[ -s /tmp/check_disks${$} ]]
then
	mailx $(whoami) < /tmp/check_disks${$}
fi
rm /tmp/check_disks${$}