Code: Select all
#! /bin/sh
#
while :
do
# pull data from website and filter the needed string
wget -O /dev/stdout "http://www.wetter.com/deutschland/sylt_ost/DE0010330.html" 2>/dev/null | grep "deg text_l temp_w" | gawk 'BEGIN {FS=">"} {print $3}' | gawk 'BEGIN {FS="&"} {printf "t9 %d\n", lround ($1 * 10.0)}'
# make sure output gets flushed
sync
# wait 30 seconds for next read
sleep 30
done
Output format of plug-in weather stations is explained in the manual in Appendix B, Plug-Ins.