Skip to content

Instantly share code, notes, and snippets.

@johnsockwell
Last active August 29, 2015 14:16
Show Gist options
  • Select an option

  • Save johnsockwell/e0b8d6a654342d8dd413 to your computer and use it in GitHub Desktop.

Select an option

Save johnsockwell/e0b8d6a654342d8dd413 to your computer and use it in GitHub Desktop.
Curls a list of urls and displays the http response code. Great for APIs!
#!/bin/sh
while read URL
do
curl -sL -w "%{http_code} %{url_effective}\\n" -o /dev/null -# $URL
done < "${1:-/dev/stdin}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment