Well I am not sure that will work since the output of the whois is very long and this info will have to be sorted, so I assume to match the data I am lookin for.Below is an example of a whois so you can have a better understanding of what our command output is.
[root@dns1 root]# whois eatme.com
[whois.crsnic.net]
Whois Server Version 1.3
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.ne
+t
for detailed information.
Domain Name: EATME.COM
Registrar: NETWORK SOLUTIONS, INC.
Whois Server: whois.networksolutions.com
Referral URL: http://www.networksolutions.com
Name Server: NS2.NATIONAL-NET.COM
Name Server: NS1.NATIONAL-NET.COM
Status: REGISTRAR-LOCK
Updated Date: 09-oct-2003
Creation Date: 07-dec-1995
Expiration Date: 06-dec-2004
>>> Last update of whois database: Mon, 10 Nov 2003 06:33:13 EST <<<
NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registr
+y is
currently set to expire. This date does not necessarily reflect the ex
+piration
date of the domain name registrant's agreement with the sponsoring
registrar. Users may consult the sponsoring registrar's Whois databas
+e to
view the registrar's reported date of expiration for this registration
+.
TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume
+and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining informat
+ion
about or related to a domain name registration record. VeriSign does n
+ot
guarantee its accuracy. By submitting a Whois query, you agree to abid
+e
by the following terms of use: You agree that you may use this Data on
+ly
for lawful purposes and that under no circumstances will you use this
+Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telep
+hone,
or facsimile; or (2) enable high volume, automated, electronic process
+es
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree no
+t to
use electronic processes that are automated and high-volume to access
+or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the r
+ight
to restrict your access to the Whois database in its sole discretion t
+o ensure
operational stability. VeriSign may restrict or terminate your access
+ to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.
The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.
[whois.networksolutions.com]
NOTICE AND TERMS OF USE: You are not authorized to access or query our
+ WHOIS
database through the use of high-volume, automated, electronic process
+es. The
Data in Network Solutions' WHOIS database is provided by Network Solut
+ions for information
purposes only, and to assist persons in obtaining information about or
+ related
to a domain name registration record. Network Solutions does not guara
+ntee its accuracy.
By submitting a WHOIS query, you agree to abide by the following terms
+ of use:
You agree that you may use this Data only for lawful purposes and that
+ under no
circumstances will you use this Data to: (1) allow, enable, or otherwi
+se support
the transmission of mass unsolicited, commercial advertising or solici
+tations
via e-mail, telephone, or facsimile; or (2) enable high volume, automa
+ted,
electronic processes that apply to Network Solutions (or its computer
+systems). The
compilation, repackaging, dissemination or other use of this Data is e
+xpressly
prohibited without the prior written consent of Network Solutions. You
+ agree not to use
high-volume, automated, electronic processes to access or query the WH
+OIS
database. Network Solutions reserves the right to terminate your acces
+s to the WHOIS
database in its sole discretion, including without limitation, for exc
+essive
querying of the WHOIS database or for failure to otherwise abide by th
+is policy.
Network Solutions reserves the right to modify these terms at any time
+.
Registrant:
TL Management, Inc. (EATME-DOM)
227 West 29th Street, #8R
New York, NY 10001
US
Domain Name: EATME.COM
Administrative Contact, Technical Contact:
TL Management, Inc. (29111475O) jfbane@aol.com
227 West 29th Street, #8R
New York, NY 10001
US
917-612-1797 fax: 646-349-4012
Record expires on 06-Dec-2004.
Record created on 07-Dec-1995.
Database last updated on 10-Nov-2003 14:40:20 EST.
Domain servers in listed order:
NS1.NATIONAL-NET.COM 66.115.130.4
NS2.NATIONAL-NET.COM 66.115.136.4