Created
April 8, 2019 14:38
-
-
Save mmodrow/c482827f7f090193f795ee99137b875b to your computer and use it in GitHub Desktop.
Determines the HTTP StatusCode for every given url and prints it tab-separated with the url (to pipe into a CSV or Excel-File)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for url in "$@" | |
do | |
statusCode=$(curl -i -s -L "$url" | grep HTTP/ | tail -1 | awk '{print $2}') | |
echo "$statusCode $url" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment