Created
January 15, 2017 18:28
-
-
Save mgeoffray/9dd079c9d0bd8df9dedaaf3dce101591 to your computer and use it in GitHub Desktop.
Bash - Get page HTTP status code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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