The Next day Forecast,
Image Use this script:
Code:
[B][I]curl "http://xml.weather.yahoo.com/forecastrss?p=YOURCITYCODE&u=c" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/\(.*\)\.\ \(.*\)/\1\?\2/" | tr "?" "\n" | sed "s/Hi\:\ \(.*\)\ Lo\:\ \(.*\)/\?Hi\: \1\ Lo\:\ \2/" | sed "s/\?\(.*\)/\\1/"[/I][/B]
Again use the city code in place of YOURCITYCODE within each of the above scripts
First off, this is GREAT and thank you for posting this!!
I dropped the shell on my desktop for the next-day forecast and it works, except it hasn't updated to Monday being the current day and Tuesday being the next day. I have it set to update every 1800 seconds. Any tips? Thanks again!
----------
I use the for Uptime:
uptime | awk '{print "Uptime: " $3 " " $4 " " $5 }' | sed -e 's/.$//g';
but i get a ',' in the end. I mean the output is 'Uptime: 10 mins,'
How can I remove the coma?
Use this instead:
uptime | awk '{sub(/[0-9]|user\,|users\,|load/, "", $6); sub(/mins,|min,/, "min", $6); sub(/user\,|users\,/, "", $5); sub(",", "min", $5); sub(":", "h ", $5); sub(/[0-9]/, "", $4); sub(/day,/, " day ", $4); sub(/days,/, " days ", $4); sub(/mins,|min,/, "min", $4); sub("hrs,", "h", $4); sub(":", "h ", $3); sub(",", "min", $3); print "Uptime: " $3$4$5$6}'