testfile() { while read FILESYSTEM FSPERCENT FSMOUNT do if [ $FSPERCENT -gt $FS_MAX ] then echo "$FILESYSTEM mounted on $FSMOUNT is bigger than $FS_MAX%. Please be careful!" > $FS_LOGFILE fi done < $FS_OUTFILE }
if [ $# -ne 0 -a $# -ne 1 ] then usage exit 1 fi
outfile testfile
if [ -s $FS_LOGFILE ] then cat $FS_LOGFILE mail < $FS_LOGFILE fi exit 0