This commit is contained in:
darkclip committed 2023-07-25 19:09:05 +08:00
1 parent b953ca1b64
commit 66e562eae6
1 file changed
+1 -1
+1 -1
View File
@@ -6,7 +6,7 @@ get_rnd(){
}; };
get_ping_loss(){ 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%?}; echo ${loss_percent%?};
return $?; return $?;
}; };