Icarus
08-29-2002, 04:35 PM
#! /bin/sh
LINE=`bdf|grep usrtmp|awk '{print $4}'`
echo 'Current size of temp:' $LINE
echo 'doing test'
if [ "$LINE" > "4500000" ] ; then
echo 'tmp is too large'
else
echo 'tmp is ok'
fi
Granted this on an HP-UX system, where 'bdf' is simular to a 'df' and usrtmp is a single filesystem.
I only need this script to check the available field, which it does just fine (thats what the first echo was to determine). The problem is no mater what I throw at it, it will retun the 'tmp is too large' everytime. currently the size is about 3900000 so this should be returning 'tmp is ok'.
Can anyone see what/if I'm missing anything?
The output is...
$ ./test.sh
Current size of temp: 3939752
doing test
tmp is too large
LINE=`bdf|grep usrtmp|awk '{print $4}'`
echo 'Current size of temp:' $LINE
echo 'doing test'
if [ "$LINE" > "4500000" ] ; then
echo 'tmp is too large'
else
echo 'tmp is ok'
fi
Granted this on an HP-UX system, where 'bdf' is simular to a 'df' and usrtmp is a single filesystem.
I only need this script to check the available field, which it does just fine (thats what the first echo was to determine). The problem is no mater what I throw at it, it will retun the 'tmp is too large' everytime. currently the size is about 3900000 so this should be returning 'tmp is ok'.
Can anyone see what/if I'm missing anything?
The output is...
$ ./test.sh
Current size of temp: 3939752
doing test
tmp is too large