Created
November 21, 2009 08:14
-
-
Save takinbo/240054 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
# Invocation: ./domain_available.sh domain.com [email protected] | |
# Could be configured with cron to alert you when a domain is available. | |
MAILTO=$2 | |
DOMAIN=$1 | |
STATUS=`whois $DOMAIN | grep 'Status:' | awk -F ' ' '{ print \$2; }'` | |
STATUS=${STATUS:="available"} | |
case $STATUS in "available") | |
echo "Is $DOMAIN available?" | mail -s "$DOMAIN available?" $MAILTO; | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment