weather.bat

Using wget

@echo off
rem
rem Show weather
rem
wget -qO- "http://www.hko.gov.hk/textonly/forecast/englishwx.htm" | sed -e "s/<[^>]*>//g" | findstr "degree"
rem sed -e :a -e '/$/N; s/\r\n//; ta;'

Using Curl

@echo off
rem
rem Show weather
rem
rem wget -O-
curl "http://www.hko.gov.hk/textonly/forecast/englishwx.htm" | sed -e "s/<[^>]*>//g"
rem sed -e :a -e '/$/N; s/\r\n//; ta;'
Comments