Hello guys, I hope you are all well and healthy!
I’m creating a script that accesses a certain device via SSH and the one inside it pinges some ip. I’ve already managed to perform SSH, the problem is being how to get the ping return. I just need to take the ping time only and put it in a variable. Thank you in advance for your support.
Below the result of ping.
ping -brief -c 1 188.8.131.52 PING 184.108.40.206: 56 data bytes, press CTRL_C to break ! --- 220.127.116.11 ping statistics --- 1 packet (s) transmitted 1 packet (s) received 0.00% packet loss round-trip min / avg / max = 42/42/42 ms
I only need one of these values after equal signal(only one of them):
round-trip min / avg / max = 42/42/42 ms