systemnotes org Location: System Notes / download / Shell / About whois_check.sh

Help for Aspiring Sysadmins

Linux / Open Source / Howto / Tips & Tricks

Language: en
 






Latest News

2009.07.29
RHCE Flash Cards Released

2008.01.11
Website Design Updated. This is a work in progress...

2008.01.11
RHCE Study Guide Removed due to a potential copyright issue

2007.12.03
RHCE Study Guide Released

 

Links:



Do you find this site useful?

donate









Spread Firefox Affiliate Button

Documents


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 blogspot.com, or wordpress.com for your blog.

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

  $ whois google.com

Obviously, google.com 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
 unixperformance
 unixinsight
 unixexpert
 unixexpertese
 unixstrategies
 abczzzzz

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

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


 $ ./whois_check.sh test.txt 
 ===============================
 unixperformance.net
 unixperformance.org
 unixperformance.info
 unixperformance.blogspot.com
 unixperformance.wordpress.com
 ====== 5 unixperformance =====
 ===============================
 unixinsight.com
 unixinsight.net
 unixinsight.org
 unixinsight.info
 unixinsight.blogspot.com
 unixinsight.wordpress.com
 ====== 6 unixinsight =====
 ===============================
 unixexpert.blogspot.com
 unixexpert.wordpress.com
 ====== 2 unixexpert =====
 ===============================
 unixexpertese.com
 unixexpertese.net
 unixexpertese.org
 unixexpertese.info
 unixexpertese.blogspot.com
 unixexpertese.wordpress.com
 ====== 6 unixexpertese =====
 sleeping 60 seconds...
 ===============================
 unixstrategies.com
 unixstrategies.net
 unixstrategies.org
 unixstrategies.info
 unixstrategies.blogspot.com
 unixstrategies.wordpress.com
 ====== 6 unixstrategies =====
 ===============================
 abczzzzz.com
 abczzzzz.net
 abczzzzz.org
 abczzzzz.info
 abczzzzz.blogspot.com
 abczzzzz.wordpress.com
 ====== 6 abczzzzz =====

The Script

whois_checkHTML format


Download iconwhois_check.sh (2.05 KiB)







back
downloads