I am new to bash and I am trying to ping a host and display the average ping times. I want to auto-update that value in a YAD window. I have it set in while loop, but the problem is that I have to close the window for the new value to repopulate. Can yad achieve such dynamic update?
Thanks
#!/bin/bash
HOSTS="google.com"
COUNT=2
while true
do
echo $(yad --title="Latency Monitor" --text="$(ping -c $COUNT $HOSTS 2>&1 | tail -1| awk -F/ '{print $6}' )" --text-align=center --no-buttons --height=50 --width=300)
done