domain expiry date

Hi all,

I want to write a shell script that read line by line of a file that have all domain names written, after reading complete file it will give us following output.

Domain Name Expiry Days-Left
abcd.com 20-Feb-200 6 10

How can i acheive that script will only print above format.

I am waiting for Folks reply.

Regards,
Bash Learner

Please post a few lines of the input file

The real problem is that the whois databases, where you would presumably get this information, use a plethora of different formats.

telnet whois.internic.net 43 # for some fun

For example, if you type in unix.com, you will see that whois.godaddy.com will give detailed information about this particular domain name. So you telnet whois.godaddy.com 43 and see what you get when you type unix.com there. Try it again with some other friendly domain names you like, especially outside the .com and .net domains, and weep.

domaintools.com have already solved this problem, by and large, and charge a very reasonable fee. I would simply go there, unless you have a pressing urge to reinvent a very hairy wheel (or no money and lots of time). I don't personally use their services, but those friends of mine who do seem to be very satisified.

I have this output
uscast.us - Domain Expiration Date: Sat Dec 13 23:59:59 GMT 2008
better-posture.com - Expiration Date: 17-mar-2009
eonigeria.org - Expiration Date:09-Jul-2014 16:27:43 UTC
alpha-male.ca - Renewal-Date: 2008/12/20

But i want to show like all above domain only

uscast.us -> YYYY-MM-DD
better-posture.com -> YYYY-MM-DD
eonigeria.org -> YYYY-MM-DD
alpha-male.ca -> YYYY-MM-DD

still waiting can anyone answer.

Regards,
Noman Liaquat

It's not allowed to bump up questions, please read the rules.

Regards

There are many threads on this site about normalizing dates, although it took me a while to come up with a link to one. date conversion is not a particularly brilliant example but might work for you, and has pointers to more.