4
0
mirror of https://github.com/darkclip/netlist.git synced 2026-11-11 23:14:10 +08:00
This commit is contained in:
darkclip 2023-07-25 19:09:05 +08:00
parent b953ca1b64
commit 66e562eae6

View File

@ -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 $?;
};