Skip to content

Instantly share code, notes, and snippets.

@ype
Last active February 26, 2016 16:19
Show Gist options
  • Save ype/1da08abda70e40a1f7b7 to your computer and use it in GitHub Desktop.
Save ype/1da08abda70e40a1f7b7 to your computer and use it in GitHub Desktop.
#!/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