The getweatherforecast script will grab the current weather icon and forecast from Yahoo!, store the HTML in /tmp/weather.html, then extract and display the current and forecasted weather from the provided URL.
You will need the getweathericon script to display the icon stored in /tmp/weather.png
I'm certain that this script can be improved and I encourage suggestions.
curl --silent -o /tmp/weather.html http://weather.yahoo.com/united-states/oregon/portland-23424682/;
curl --silent -o /tmp/weather.png $(grep "div\ class=\"forecast-icon\"\ style=\"background:url" /tmp/weather.html| awk -F"'" '{ printf $2 }');for NUM in $(grep -n "<li><strong>.*\n" /tmp/weather.html|cut -d":" -f1); do TARGET=$((NUM+1)) ; sed -n "$NUM"p /tmp/weather.html|sed 's|<li><strong>||g'|sed 's|</strong>||g'| sed 's/^[\t]*//'; sed -n "$TARGET"p /tmp/weather.html ;
