Skip to content

Instantly share code, notes, and snippets.

@sashka
Created April 22, 2013 12:44
Show Gist options
  • Save sashka/5434618 to your computer and use it in GitHub Desktop.
Save sashka/5434618 to your computer and use it in GitHub Desktop.
Monitor HTTP response with Curl
response=$(curl --write-out %{http_code} --silent --output /dev/null http://httpbin.org/status/200)
if [ $response -gt 302 ]; then
echo ${response}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment