The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Root account - disable expiry frustrated1 SUN Solaris 6 05-26-2008 06:02 AM
How to set an non-expiry in HP-Unix bullz26 HP-UX 2 02-29-2008 03:08 AM
passwd expiry bullz26 SUN Solaris 2 02-23-2008 04:53 PM
Find user password expiry date oztoma UNIX for Dummies Questions & Answers 2 04-02-2007 05:43 AM
password expiry big123456 UNIX for Advanced & Expert Users 2 01-14-2006 08:12 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-20-2008
Registered User
 

Join Date: Mar 2008
Posts: 76
Stumble this Post!
Red face 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
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-21-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,841
Stumble this Post!
Please post a few lines of the input file
Reply With Quote
  #3 (permalink)  
Old 03-23-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Stumble this Post!
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.

Last edited by era; 03-23-2008 at 03:00 AM. Reason: Pointer to Domaintools
Reply With Quote
  #4 (permalink)  
Old 05-20-2008
Registered User
 

Join Date: Mar 2008
Posts: 76
Stumble this Post!
Quote:
Originally Posted by jim mcnamara View Post
Please post a few lines of the input file
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
Reply With Quote
  #5 (permalink)  
Old 05-21-2008
Registered User
 

Join Date: Mar 2008
Posts: 76
Stumble this Post!
still waiting can anyone answer.

Regards,
Noman Liaquat
Reply With Quote
  #6 (permalink)  
Old 05-21-2008
Moderator
 

Join Date: Feb 2007
Posts: 1,953
Stumble this Post!
It's not allowed to bump up questions, please read the rules.

Regards
Reply With Quote
  #7 (permalink)  
Old 05-22-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Stumble this Post!
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.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0