On Mon, Oct 6, 2008 at 11:04 AM, Scott Kokotovitch
<[EMAIL PROTECTED]> wrote:
> ----------------------
> #!/bin/sh
> THING=`df -H | head -3 | tail -1 | awk '{print $4}' | sed 's/\(.*\)./\1/'`
> # echo $THING
> if [ $THING -gt 55 ]; then
> echo 'Greater than 55'
> else
> echo 'Lower than 55'
> fi
Given this:
$ df -H
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 56G 46G 7.3G 87% /
varrun 1.6G 115k 1.6G 1% /var/run
varlock 1.6G 0 1.6G 0% /var/lock
udev 1.6G 91k 1.6G 1% /dev
devshm 1.6G 0 1.6G 0% /dev/shm
THING is 1.6:
$ THING=`df -H | head -3 | tail -1 | awk '{print $4}' | sed 's/\(.*\)./\1/'`
$ echo $THING
1.6
Is that the expected result?
> Shouldn't it be pretty easy to throw this in without disrupting much?
Yup.
Regards,
- Robert