Created
September 3, 2015 13:59
-
-
Save Guzzter/710ae2aca29d09bf9ae6 to your computer and use it in GitHub Desktop.
Bash script to test url and log the http response codes
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
#!/bin/sh | |
input=list.txt | |
output=urls_result.txt | |
siteprefix=https://www.site.com | |
rm -rf $output | |
while read LINE | |
do | |
url=$siteprefix${LINE:1} | |
echo Processing $url | |
curl -o /dev/null --silent --progress-bar --head --write-out '%{http_code} %{url_effective}\n' "$url" >> $output | |
done < "$input" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment