Skip to content

Instantly share code, notes, and snippets.

@winny-
Created September 18, 2014 22:16
Show Gist options
  • Save winny-/c29694b6b28480a4e333 to your computer and use it in GitHub Desktop.
Save winny-/c29694b6b28480a4e333 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Based off of https://superuser.com/questions/433316/check-a-list-of-domains-with-the-whois-command
while read domain; do
printf '%s ' "$domain" # This way we know what whois is currently looking up before it completes.
whois "$domain" | grep -qci 'No Match'
if [ $? -ne 0 ]; then echo "REGISTERED"; else echo "AVAILABLE"; fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment