分类:
2006-06-29 20:33:13
#!/bin/sh # # Get the weather of the city. # city=$(grep city ecx.xml|cut -d">" -f2 | cut -d"<" -f1) case $city in haerbin) url=%B9%FE%B6%FB%B1%F5 ;; shanghai) url=%C9%CF%BA%A3 ;; beijing) url=%B1%B1%BE%A9 ;; esac wget -O tianqi.html $url sed 's/>/' tianqi.html | cut -d">" -f2 | sed '/^$/d'| sed '/^[ \t]*[<\&]/d' | sed 's/<\/.*//' > tianqi.txt |