Skip to content

Instantly share code, notes, and snippets.

@nmicht
Last active August 31, 2019 23:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmicht/7175264 to your computer and use it in GitHub Desktop.
Save nmicht/7175264 to your computer and use it in GitHub Desktop.
This script do a loop to read all the lines in file "url-list" and with curl get the http code response
# This script do a loop to read all the lines in file "url-list"
# Usign curl with get the http code of the url and print it with the url
#!/bin/bash
while read LINE; do
curl -o /dev/null --silent --head --write-out '%{http_code}' "$LINE"
echo ' '$LINE
done < url-list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment