Skip to content

Instantly share code, notes, and snippets.

@shaunmolloy
Last active January 8, 2021 14:09
Show Gist options
  • Save shaunmolloy/82b4b494d5cfc765b1048130cb2d30b0 to your computer and use it in GitHub Desktop.
Save shaunmolloy/82b4b494d5cfc765b1048130cb2d30b0 to your computer and use it in GitHub Desktop.
isup - check if websites (args passed) are up
#!/usr/bin/env bash
# check if websites (args passed) are up
for site in $@
do
echo
echo $site
curl -I -s $site | head -n 1 | grep -q "404" && echo down || echo up
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment