Posted By

shazow on 04/23/09


Tagged

domain whois


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

shazow


Shell script for domain searching binges


 / Published in: Bash
 

Takes input from stdin, so you can keep typing in domains to see if they're available. Requires whois to be installed.

Just paste it into your terminal, and start typing in domains (e.g. google.com and hit enter) and it will tell you if the domain is available or not.

Tested with .com, .net, .org, .ca, you're welcome to write a more robust version!

Example
$ while read i; do echo -n "$i is ";  ( whois $i  | grep -F "$(echo -e 'No match\nNOT FOUND\n  AVAIL')" -q && echo 'AVAILABLE! :D' || echo 'taken :('); 
ohhai.net
ohhai.net is taken :(
omgbbqponies.com
omgbbqponies.com is AVAILABLE! :D
  1. #!/bin/bash
  2. while read i; do
  3. echo -n "$i is ";
  4. whois $i | grep -F "$(echo -e 'No match\nNOT FOUND\n AVAIL')" -q && echo 'AVAILABLE! :D' || echo 'taken :(';
  5. done

Report this snippet  

You need to login to post a comment.