Last active
February 26, 2016 16:19
-
-
Save ype/1da08abda70e40a1f7b7 to your computer and use it in GitHub Desktop.
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 bash | |
HYPERLINK="$1" | |
canyoudigit () { | |
RETVAL=1; | |
while [ $RETVAL -ne 0 ] | |
do | |
clear | |
VAL=$(dig "$HYPERLINK") | |
echo "$VAL" | |
echo "$VAL" | grep ^"$(echo $HYPERLINK | cut -d'.' -f2)" | |
RETVAL=$? | |
sleep 5 | |
done | |
} | |
main () { | |
canyoudigit | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment