Skip to content

Instantly share code, notes, and snippets.

@joshuaherman
Forked from cganterh/test.sh
Last active August 29, 2015 14:04
Show Gist options
  • Save joshuaherman/27152646c420ad5cb950 to your computer and use it in GitHub Desktop.
Save joshuaherman/27152646c420ad5cb950 to your computer and use it in GitHub Desktop.
#!/bin/bash
while true
do
wget -q --tries=10 --timeout=20 -O - http://google.com > /dev/null
if [[ $? -eq 0 ]]; then
echo $(date) "1" | tee -a log.csv
else
echo $(date) "0" | tee -a log.csv
fi
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment