Created
March 31, 2017 14:12
-
-
Save shrop/5da5d831f571d19f0be6e9183b1ebf55 to your computer and use it in GitHub Desktop.
Script to loop through a text file list of URLs and output the curl -I to a text file
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 | |
for i in $(cat urls.txt); do | |
content=$(curl -I -s "{$i}") | |
echo "URL: $i" >> output.txt | |
echo "$content" >> output.txt | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Credit to: http://stackoverflow.com/questions/16131321/shell-script-using-curl-to-loop-through-urls