Created
November 2, 2020 12:24
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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