Skip to content

Instantly share code, notes, and snippets.

@nmicht
Last active Aug 31, 2019
Embed
What would you like to do?
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