Skip to content

Instantly share code, notes, and snippets.

@eramdam
Created April 5, 2014 17:21
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 eramdam/dc05745f977f3fa18dd5 to your computer and use it in GitHub Desktop.
Save eramdam/dc05745f977f3fa18dd5 to your computer and use it in GitHub Desktop.
A script to test then output the HTTP code of a lot of URLs with curl (using HEAD requests) (made for https://gist.github.com/Meroje/9994612 )
#!/bin/bash
while read LINE; do
curl -o /dev/null --silent --head --write-out '%{http_code}' "$LINE"
echo " $LINE"
done < ./urls.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment