Post #3623362
2026-06-26 17:59 UTC
Making use of this one-liner today as we're getting a bunch of intermittent Internet outages in the neighborhood
while ! ping -c 1 www.google.com &> /dev/null; do sleep 1; done; say "Internet is back"
Replies (1)
-
@hrbrmstr@mastodon.social 2026-06-26 18:08
@noamross@ecoevo.social n=0; until [ "$n" -ge 5 ]; do ping -c1 -W2 1.1.1.1 &>/dev/null && n=$((n+1)) || n=0; done; say "Internet is back" "5 good pings in a row before declaring victory,"