Created
October 17, 2012 12:42
-
-
Save glarrain/3905336 to your computer and use it in GitHub Desktop.
Test whether each of the domains in the list is up or not
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
#!/usr/bin/env sh | |
# Uses curl to connect to www.isup.me, a website that checks if a given domain | |
# is up or not. The response will contain "It's just you" if the domain is up. | |
# If not, it will contain "It's not just you". | |
test $# -lt 1 && (echo "Usage: $0 domain [domain2] [domain3] ..."; exit 1;) | |
for domain in "$@"; do | |
echo -n "$domain: " | |
(curl -s "http://www.isup.me/$domain" | grep "It's just you." 1>/dev/null) && echo "It's just you" || echo "It's down" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment