Advertisement
okubax

weather_simple

Feb 8th, 2014
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #!/bin/sh
  2. #AccuWeather (r) RSS weather tool for conky
  3. #
  4. #USAGE: weather.sh <locationcode>
  5. #
  6. #(c) Michael Seiler 2007
  7.  
  8. METRIC=1 #Should be 0 or 1; 0 for F, 1 for C
  9.  
  10. if [ -z $1 ]; then
  11. echo
  12. echo "USAGE: weather.sh <locationcode>"
  13. echo
  14. exit 0;
  15. fi
  16.  
  17. curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print "$1"; }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement