Skip to content

Instantly share code, notes, and snippets.

@shedali
Last active August 29, 2015 13:58
Show Gist options
  • Save shedali/10270192 to your computer and use it in GitHub Desktop.
Save shedali/10270192 to your computer and use it in GitHub Desktop.
crawl site for broken links
if [[ $1 == http://* ]] ;
then
url=$1
else
url=http://www.shedali.co.uk$1;
fi
if curl -s --head $url | grep "200 OK\|302 Moved Temporarily\|301 Moved*"
then
echo "$url OK"
else
echo "- - - $url FAIL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment