Skip to content

Instantly share code, notes, and snippets.

@gitowiec
Forked from shrop/curl-loop.sh
Created March 22, 2021 09:20
Show Gist options
  • Save gitowiec/3b69f187021ac057663ce9d84e6cd462 to your computer and use it in GitHub Desktop.
Save gitowiec/3b69f187021ac057663ce9d84e6cd462 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment