I need to get the current date off a remote site, such as Google or Yahoo.
Does anyone know how to use the wget command on a Solaris 10 system to do this? I recall a long time ago, where using "wget" will get a bunch of info off a site, and then, you can extract the date from all of that info.
This is what I tried, and it doesn't work:
/usr/sfw/bin/wget yahoo dot com (I can't paste the link here)
--09:51:03-- http://www.yahoo.com/
=> `index.html.1'
Resolving www.yahoo.com... 87.248.122.122, 87.248.112.181
Connecting to www.yahoo.com|87.248.122.122|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.0 302 Found
Date: Thu, 21 Apr 2011 07:51:03 GMT
P3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
Cache-Control: private
Set-Cookie: IU=deleted; expires=Wed, 21-Apr-2010 07:51:02 GMT; path=/; domain=.yahoo.com
Set-Cookie: fpc=d=QYjtE9OdzrgTsvj2ZSHAEUysiGpvBxV3CwVfI_Hd9MLrnBm4W85EufcBK1Pt7LShjT_IohviXXHc_cajJZpV8_0Ecz8Dtdau57X4D40rdTyFKdkwZM4Xj82uYBAUy6Xmf.P5jmvFf90OF8CkKYEgSge.kGeJo7dVkxgCis_dTY82tv8dmuB3cBQIf5ByexRUht39qyk-&v=2; expires=Fri, 20-Apr-2012 07:51:03 GMT; path=/; domain=www.yahoo.com
Location: http://de.yahoo.com/?p=us
.......
i think curl may do that better, at least without so many overheads.