Skip to content

Instantly share code, notes, and snippets.

@cganterh
cganterh / test.sh
Created June 16, 2014 20:24
Simple bash script to test the internet connection state.
#!/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