Skip to content

Instantly share code, notes, and snippets.

@loisaidasam
Created June 11, 2014 16:35
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 loisaidasam/0e1f93d1191262eda5d5 to your computer and use it in GitHub Desktop.
Save loisaidasam/0e1f93d1191262eda5d5 to your computer and use it in GitHub Desktop.
curl, simply returning response code
#!/bin/bash
curl -sL -w "%{http_code} %{url_effective}\\n" -o /dev/null "$@"
@loisaidasam
Copy link
Author

Example:

$ curl_response_code google.com
200 http://www.google.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment