From 6413f83e8dc4910fd34d586937421ccb3f5aae97 Mon Sep 17 00:00:00 2001 From: darkclip Date: Thu, 3 Aug 2023 03:12:22 +0800 Subject: [PATCH] update --- cf-watch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 $?;