All pastes #468878 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-03 12:49 UTC
rendered paste body
#!/bin/sh
PING="/bin/ping"
# Google, for example
ADDR="google.co.uk"
DATA=`$PING -c10 -s50 $ADDR -q `
LOSS=`echo $DATA | awk '{print $18 }' | tr -d %`
echo $LOSS
if [ $LOSS = 100 ];
then
              echo 0
else
       echo $DATA | awk -F/ '{print $5 }'
fi
echo 0
echo "localhost.ping"