Created
June 12, 2012 01:40
-
-
Save kurosuke/2913885 to your computer and use it in GitHub Desktop.
get Tokyo weather text file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# yahoo weather | |
# | |
# weather text | |
TEXT_INFO=`curl --silent "http://xml.weather.yahoo.com/forecastrss?p=JAXX0085&u=c" | grep yweather:conditio ` | |
TEXT=`echo $TEXT_INFO | sed -e 's/.*text="//' -e 's/".*//'` | |
TEMP=`echo $TEXT_INFO | sed -e 's/.*temp="//' -e 's/".*//'` | |
TEMP=`expr $TEMP - 50` | |
DATE=`echo $TEXT_INFO | sed -e 's/.*date="//' -e 's/".*//'` | |
#echo $TEXT $TEMP "° <BR>" $DATE | |
echo $TEXT ":" $TEMP "C" | |
echo $DATE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment