![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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.
|
|||
| Google The UNIX and Linux Forums |