Skip to content

Instantly share code, notes, and snippets.

@rahearn
Created September 13, 2012 13:59
Show Gist options
  • Save rahearn/3714504 to your computer and use it in GitHub Desktop.
Save rahearn/3714504 to your computer and use it in GitHub Desktop.
Simple ping script to test connectivity. Used previously to build case against Comcast's terrible service even while not home.
#!/bin/sh
# Simple script for checking network availability every 5 minutes
while true; do
ping -c 1 www.google.com &> /dev/null
echo "$? `date`" | tee -a ~/output.txt
sleep 300
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment