diff --git a/cf-watch.sh b/cf-watch.sh index 9d7d4302..6db5baea 100755 --- a/cf-watch.sh +++ b/cf-watch.sh @@ -6,7 +6,7 @@ get_rnd(){ }; get_ping_loss(){ - loss_percent=$(ping -c 5 -q $1 | awk '/packet loss/{print $((NF-4))}'); + loss_percent=$(ping -c 5 -q $1 | awk '/packet loss/{print $7}'); loss=${loss_percent%?}; echo ${loss%.*}; return $?;