#!/bin/bash
#TITLE : Case.sh
#CREATED : 09/22/2014
#CREATED BY :
#########################################################
SPACE=$(df -h | awk '{ print $5 }' | grep -v Use | sort -n | tail -1 | cut -d % -f1 )
case $SPACE in
[1-6]* | ?)
MESSAGE="All is quiet."
;;
[7-8]?)
MESSAGE="Start thinking about cleaning out some stuff. There's a partition that is $SPACE % full."
;;
9[0-8])
MESSAGE="Better hurry with that new disk... One partition is $SPACE % full."
;;
99)
MESSAGE="I'm drowning here! There's a partition at $SPACE %!"
;;
*)
MESSAGE="I seem to be running with an nonexistent amount of disk SPACE..."
;;
esac
echo $MESSAGE