mirror of
https://github.com/darkclip/netlist.git
synced 2026-11-19 11:43:47 +08:00
update
This commit is contained in:
1 parent
6413f83e8d
commit
12c8536a5c
1 file changed
+1
-1
+1
-1
@@ -6,7 +6,7 @@ get_rnd(){
|
||||
};
|
||||
|
||||
get_ping_loss(){
|
||||
loss_percent=$(ping -c 5 -q $1 | awk '/packet loss/{print $7}');
|
||||
loss_percent=$(ping -c 5 -q $1 | awk '/packet loss/{for(i=6;i<=NF;i++)if($i ~ /packet/)print $((i-1))}');
|
||||
loss=${loss_percent%?};
|
||||
echo ${loss%.*};
|
||||
return $?;
|
||||
|
||||
Reference in new issue
Block a user