#!/bin/bash
#consult today and tomorrow weather from
# http://www.weather.com.cn, hangzhou only。
w3m -dump_source "http://www.weather.com.cn/html/weather/101210101.shtml" | grep "<title>" | sed "s/<title>//" | sed "s/<\/title>\s*$//"
---------------------------------
原理:读取http://www.weather.com.cn/的天气,用w3m的dump_source功能得到html源码,提取title信息,即得近日到明天的天气。