Skip to content

Instantly share code, notes, and snippets.

@ccimpoi
Created November 2, 2020 12:24
Show Gist options
  • Save ccimpoi/d120ace06831a4f8f1c338e585b4bdcd to your computer and use it in GitHub Desktop.
Save ccimpoi/d120ace06831a4f8f1c338e585b4bdcd to your computer and use it in GitHub Desktop.
ISP connection monitor with ping every 10 sec and print date time it fails
while true; do if [[ $(ping -c 1 8.8.8.8 2>&1 | grep "1 packets received" | wc -c) -eq 0 ]]; then echo $(date); fi; sleep 10; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment