Skip to content

Instantly share code, notes, and snippets.

@pce
Created July 11, 2014 11:51
Show Gist options
  • Select an option

  • Save pce/7ecab1d730aa1ce1f21a to your computer and use it in GitHub Desktop.

Select an option

Save pce/7ecab1d730aa1ce1f21a to your computer and use it in GitHub Desktop.
#!/bin/bash
# TODO use $TLD to build a regex for egrep and strlen of head
TLD=to
for domain in $(aspell -l en dump master | egrep '^\w{3,5}to$')
do
domain=$(echo $domain | head -c-3).$TLD
echo $domain
whois $domain | grep "Status: free" >/dev/null && echo "the domain $domain seems available"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment