Skip to content

Instantly share code, notes, and snippets.

@mgeoffray
Created January 15, 2017 18:28
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 mgeoffray/9dd079c9d0bd8df9dedaaf3dce101591 to your computer and use it in GitHub Desktop.
Save mgeoffray/9dd079c9d0bd8df9dedaaf3dce101591 to your computer and use it in GitHub Desktop.
Bash - Get page HTTP status code
function get_http_status() {
curl -s -o /dev/null -I -w "%{http_code}\n" $1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment