Last active
May 4, 2018 09:09
-
-
Save anvius/6baf9210e5368019e4c00e69b0f58d55 to your computer and use it in GitHub Desktop.
To know if domain has dns active.
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 | |
v=`whois $1 | grep match | wc | awk '{print $1}'` | |
if [ $v = 0 ]; | |
then | |
echo "$1 is taken" | |
else | |
echo "I don't know if $1 is taken" | |
fi |
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 | |
n=`nslookup $1 1.1.1.1 | grep 'Name' | wc | awk '{print $1}'` | |
if [ $n = 0 ]; | |
then | |
echo "I don't know if $1 is taken" | |
else | |
echo "$1 is taken" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment