OT: getting the temp.
Henry Arredondo
hxarredondo at LKQCORP.com
Tue Apr 16 12:00:17 PDT 2013
Hi, Has anyone tried to get current or daily range temperature using Unix/Linux command line ? I'm using wget but I was wondering if there's an easier way to do this.
Here's what I'm doing :
wget -O tempx http://weather.yahooapis.com/forecastrss?p=75050 {get temp for zip code 75050}
then I do a
grep yweather:forecast tempx | head -n 1
and now I'm stuck on how to parse the word low and high from this line into a $String :
<yweather:forecast day="Tue" date="16 Apr 2013" low="71" high="87" text="Partly Cloudy" code="30" />
LOW=' grep yweather:forecast tempx | head -n 1 | search "low" bring "71"`
HIGH=' grep yweather:forecast tempx | head -n 1 | search "high" bring "87"` <-- kinda deal ?
Any ideas?
Please consider the environment before printing
More information about the Filepro-list
mailing list