Last active
March 20, 2017 11:36
-
-
Save Erikdekamps/4b213ba345cff662af16dfa24553c34f to your computer and use it in GitHub Desktop.
cURL - Get http codes from list of urls
This file contains hidden or 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/bash | |
while read LINE; do | |
# cURL the url and write to file. | |
curl -o /dev/null --silent --progress-bar --head --write-out '%{http_code} | %{url_effective}\n' "$LINE" >> result.txt | |
# Echo the line in terminal. | |
echo "$LINE" | |
# The file name below. | |
done < urls.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment