I am trying to perform a simple check on an integer value output from ping. In Linux this was working quite nicely, but the FreeBSD ping outputs a float value with percentage sign suffixed.
LOSS=`/sbin/ping -c 10 -W 1000 -n $IP | grep loss | awk '{print $7}'`
if [ ${LOSS} > ${LIMIT} ]; then
# Do something here
fi
But since the value of ${LOSS} is a string, the comparison is failing under BSD.
Help, please?