Skip to content

Instantly share code, notes, and snippets.

@TheHiddenHaku
Created July 3, 2015 06:53
Show Gist options
  • Save TheHiddenHaku/653576d25dc9105c083a to your computer and use it in GitHub Desktop.
Save TheHiddenHaku/653576d25dc9105c083a to your computer and use it in GitHub Desktop.
Check if url is 404
read -e -p "Inserisci la URL da controllare: " yourURL
while [ 1 ]
do
if curl --output /dev/null --silent --head --fail "$yourURL"
then
echo "This URL Exist"
open $yourURL
exit
else
echo "This URL Not Exist"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment