Site Feed

Friday, November 28, 2008

How to Find Domain Names with

The idea to write a shell script is often the result of having to do repeated tasks. Imagine having to check hundreds of domain names by typing "whois" each time. It would take much longer than writing a simple script.

Using whois to Check for Available Domain Names

Suppose you want to find a good domain name, but you want to see if all of the domain suffixes are available? For example, you want a good .com domain, but you also want the .net, and .org. Not only that, but you might want to use, or for your blog.

You can always check a domain availability by using the whois command, e.g.

$ whois

Obviously, is not available, so whois will display information about the company that registered the domain name. If the domain is not taken, then whois will usually return "No match", or "NOT FOUND". You have to keep trying a domain name until you find one that is available. This can be time-consuming to do manually.

Here is a simple shell script to run a whois query on a list of domains.

First, you will need to generate a list of domains to test. Here is an example file:

$ cat test.txt

For details on how to create a large test file see:

Then simply run the script using the .txt file you created as a parameter:

$ ./ test.txt
====== 5 unixperformance =====
====== 6 unixinsight =====
====== 2 unixexpert =====
====== 6 unixexpertese =====
sleeping 60 seconds...
====== 6 unixstrategies =====
====== 6 abczzzzz =====

The Script

whois_check -- HTML format

No comments: