whois

Domain searching with bash

Below is a simple bash script that uses the dictionary to go through 3 letter words and does a whois check to see if the domain is available. You probably won't find any of those as all would have been taken. May want to try with 5 or 6 letters instead, in which case change the value of "$count".

#!/bin/bash
# domain_search.sh

# Get a list of 3 letter domains.
for x in `cat /usr/share/dict/words`; do count=`echo $x| wc -m`; [ $count = 4 ] && echo $x; done > domains_list.txt

# Get whois record.
for x in `cat ./domains_list.txt` ; do (whois $x.com | grep -q '^No match for domain') && echo $x; sleep 60; done > domains_available.txt

# Change to lowercase and sort print.
cat domains_available.txt | tr [:upper:] [:lower:]|sort| uniq

Comment