OS X comes with the 'whois' command, a useful utility for checking domain name registrations and finding domain contacts. It's run from Terminal.app. However, since the advent of all the new ICANN approved registrars for domains, one must run 'whois' twice to actually get some meaningful results if the domain is not registered at Network Solutions. Run whois once to get the whois server that's serving the domain information, and a second time (with the "-h" swtich), to actually query the first referenced whois server.
I've written a little bash script to make this just a little bit easier (and in one step). It's included below in the hopes others may find it useful.
#!/bin/bash[IMPORTAND NOTE: The "export" line must be entered as one line, not two; just replace the line break with a space...]
echo "Getting server..."
export SERVER=`whois $1 | grep -i whois\ server: |
awk '{print $3'}`
echo "Searching server: $SERVER"
whois -h $SERVER $1
Getting server...[Editor's note: I tested this an it ran just fine as is in my relatively standard tcsh shell environment.]
Searching server: whois.godaddy.com
The data contained in Go Daddy Software, Inc.'s WHOIS database,
while believed by the company to be reliable, is provided "as is"...
Mac OS X Hints
http://hints.macworld.com/article.php?story=200301290631382