Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory

Leo Tao

Reviews(1)
byLeo Tao, April 25, 2011
A little changes I did to fit for more whois result:
expiration=`whois $domain |grep -i "Expir.*20[0-9][0-9]"|sed -e 's/\s/\n/g'|grep "20[0-9][0-9]"`
> # date format dd-mm-yyyy (UK format) transmition
> ukdate=`echo $expiration | grep "[0-3][0-9]-[0-1][0-9]-20[0-9][0-9]\$"`
> [ -n "$ukdate" ] && expiration=`echo $ukdate|awk -F"-" '{print $3"-"$2"-"$1}'`