Skip to content

Instantly share code, notes, and snippets.

@shrop
Created March 31, 2017 14:12
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shrop/5da5d831f571d19f0be6e9183b1ebf55 to your computer and use it in GitHub Desktop.
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
#!/bin/bash
for i in $(cat urls.txt); do
content=$(curl -I -s "{$i}")
echo "URL: $i" >> output.txt
echo "$content" >> output.txt
done
@shrop
Copy link
Author

shrop commented Mar 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment