Skip to content

Instantly share code, notes, and snippets.

Avatar

Michelle Torres nmicht

View GitHub Profile
@nmicht
nmicht / curl-http-code.sh
Last active Aug 31, 2019
This script do a loop to read all the lines in file "url-list" and with curl get the http code response
View curl-http-code.sh
# 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