Or some more complicated sed'ing, eliminating both grep and awk expiration=`whois $domain -h registry.co.ug | sed -n 's/Expiry:[ ]*\([0-9]*\)[nrst][dht]* \(.*\), \([0-9]*\)/\1 \2 \3/p'`
P. -- Evolution (n): A hypothetical process whereby infinitely improbable events occur with alarming frequency, order arises from chaos, and no one is given credit. On 21 July 2012 20:28, Victor van Reijswoud <[email protected]>wrote: > nice! > > On Sat, Jul 21, 2012 at 5:49 PM, Simon Vass <[email protected]> wrote: > > Ok I sussed it. > > > > expiration=`whois $domain -h registry.co.ug|grep "Expiry:"| awk > -F"Expiry:" '{print $2}'|cut -f 1|sed -e 's/^[ \t]*//'| cut -c1-2,5-|sed -e > 's/\,//'` > > > > > > > > > > > > Simon Vass > > Managing Director > > E-Tech Uganda Ltd > > > > http://www.etech.ug > > Tel: +256 (0) 312260620 or (0) 312260621 > > email: [email protected] > > skype: e-techservicedesk > > > > > > ----- Original Message ----- > > From: "Simon Vass" <[email protected]> > > To: "Uganda Linux User Group" <[email protected]> > > Sent: Saturday, 21 July, 2012 5:51:15 PM > > Subject: Re: [LUG] Scripting Help > > > > Okello, > > > > Yeah I am trying the same thing in perl using parsedatetime. > > > > > > > > > > > > Simon Vass > > Managing Director > > E-Tech Uganda Ltd > > > > http://www.etech.ug > > Tel: +256 (0) 312260620 or (0) 312260621 > > email: [email protected] > > skype: e-techservicedesk > > > > > > ----- Original Message ----- > > From: "Okello" <[email protected]> > > To: "Uganda Linux User Group" <[email protected]> > > Sent: Saturday, 21 July, 2012 5:41:11 PM > > Subject: Re: [LUG] Scripting Help > > > > On Saturday 21 July 2012 15:55:12 Simon Vass wrote: > >> I considered using Python and Perl, but would have to rewrite the rest > of > >> the script as well and am feeling lazy. Plus I can't imagine with a sed > or > >> awk it isn't possible? > > > > it is possible, but in perl there is some library that 'eats' with one > functon > > nearly every date/time format. Why invent the wheel two times then? > > > > Do not rewrite the script, use $(perl -e "...") within it. > > > > Okello > > > > > > -- > > Separating code and design in websites http://www.uHTML.info > > _______________________________________________ > > The Uganda Linux User Group: http://linux.or.ug > > > > Send messages to this mailing list by addressing e-mails to: > [email protected] > > Mailing list archives: http://www.mail-archive.com/[email protected]/ > > Mailing list settings: http://kym.net/mailman/listinfo/lug > > To unsubscribe: http://kym.net/mailman/options/lug > > > > The Uganda LUG mailing list is generously hosted by INFOCOM: > http://www.infocom.co.ug/ > > > > The above comments and data are owned by whoever posted them (including > attachments if any). The mailing list host is not responsible for them in > any way. > > _______________________________________________ > > The Uganda Linux User Group: http://linux.or.ug > > > > Send messages to this mailing list by addressing e-mails to: > [email protected] > > Mailing list archives: http://www.mail-archive.com/[email protected]/ > > Mailing list settings: http://kym.net/mailman/listinfo/lug > > To unsubscribe: http://kym.net/mailman/options/lug > > > > The Uganda LUG mailing list is generously hosted by INFOCOM: > http://www.infocom.co.ug/ > > > > The above comments and data are owned by whoever posted them (including > attachments if any). The mailing list host is not responsible for them in > any way. > > _______________________________________________ > > The Uganda Linux User Group: http://linux.or.ug > > > > Send messages to this mailing list by addressing e-mails to: > [email protected] > > Mailing list archives: http://www.mail-archive.com/[email protected]/ > > Mailing list settings: http://kym.net/mailman/listinfo/lug > > To unsubscribe: http://kym.net/mailman/options/lug > > > > The Uganda LUG mailing list is generously hosted by INFOCOM: > http://www.infocom.co.ug/ > > > > The above comments and data are owned by whoever posted them (including > attachments if any). The mailing list host is not responsible for them in > any way. > _______________________________________________ > The Uganda Linux User Group: http://linux.or.ug > > Send messages to this mailing list by addressing e-mails to: > [email protected] > Mailing list archives: http://www.mail-archive.com/[email protected]/ > Mailing list settings: http://kym.net/mailman/listinfo/lug > To unsubscribe: http://kym.net/mailman/options/lug > > The Uganda LUG mailing list is generously hosted by INFOCOM: > http://www.infocom.co.ug/ > > The above comments and data are owned by whoever posted them (including > attachments if any). The mailing list host is not responsible for them in > any way. >
_______________________________________________ The Uganda Linux User Group: http://linux.or.ug Send messages to this mailing list by addressing e-mails to: [email protected] Mailing list archives: http://www.mail-archive.com/[email protected]/ Mailing list settings: http://kym.net/mailman/listinfo/lug To unsubscribe: http://kym.net/mailman/options/lug The Uganda LUG mailing list is generously hosted by INFOCOM: http://www.infocom.co.ug/ The above comments and data are owned by whoever posted them (including attachments if any). The mailing list host is not responsible for them in any way.
