Created
January 22, 2014 14:34
-
-
Save IndrekV/8559675 to your computer and use it in GitHub Desktop.
Simple script to check urls.
This file contains 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
urls=( | |
"http://google.com" | |
"http://this-is-probably-an-404.com" | |
) | |
for i in "${urls[@]}" | |
do | |
# request without following the redirects | |
curl -s -w "%{http_code} %{url_effective}\\n" $i -o /dev/null | |
# To follow redirects use | |
#curl -sL -w "%{http_code} %{url_effective}\\n" $i -o /dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment