Skip to content

Instantly share code, notes, and snippets.

@sudodoki
Created November 17, 2016 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sudodoki/ed3f022b618014885f7fa74c07ec7bf3 to your computer and use it in GitHub Desktop.
Save sudodoki/ed3f022b618014885f7fa74c07ec7bf3 to your computer and use it in GitHub Desktop.
#!/bin/bash
while true
do
output=$( curl -s $1 -D -)
if [ $? -ne 0 ]; then
echo "$(date) Something went wrong with $1: $output
"
else
echo "$(date) Got response $1"
fi
sleep 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment