Last active
August 31, 2023 10:45
-
-
Save sathishmanohar/e25f7d5d6330a0cf035b7723a07f547c to your computer and use it in GitHub Desktop.
Find .com Domain availability from terminal
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
#!/bin/bash | |
# This sophisticated script written to save those precious domain names you found | |
# after hours and hours of searching only to find out that you don't have the $10 | |
# to actually buy the domain. After you hustle your way to have $10 in your account | |
# you find out that the domain is taken. From this point on you are wondering your | |
# entire life if that is GoDaddy that actually snatched that domain from you. | |
# Worry no more. This tiny little script can save you from the tyranny of big domain tech | |
# by searching for available domain names without going through domain providers. | |
# This script is distruted under ABRMS license | |
# https://github.com/ErikMcClure/bad-licenses/blob/master/ABRMS-license.md | |
while [ "$name" != "exit" ] | |
do | |
# Get the Domain Name from User | |
echo "What domain name do you want?: [Enter]" | |
read name | |
# Check if the input is not empty or just spaces | |
if [[ -z "${name// }" ]]; then | |
echo "Input is empty" | |
continue | |
fi | |
# Check if the input has .com in it | |
if [[ ! "$name" =~ ".com" ]]; then | |
echo "Enter valid .com domain" | |
continue | |
fi | |
# Check if the input domain is available | |
if whois $name | grep -q 'No match for'; then | |
echo "Available" | |
else | |
echo "Oops. Taken" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment