diff --git a/cf-watch.sh b/cf-watch.sh index 70c5e649..5e3282b9 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 $6}'); + loss_percent=$(ping -c 5 -q $1 | awk '/packet loss/{print $(NF-4)}'); echo ${loss_percent%?}; return $?; };