#! /bin/sh weather () { curl -s 'http://rss.wunderground.com/auto/rss_full/NM/Los_Alamos.xml?units=metric' | \ awk -F ' [-:] ' ' (/Current Conditions/) { print "

" $2 "

"; } (c == 2) { print "

" $0 "

"; exit; } (/CDATA/) { c++; }' } section () { echo "

$1

" echo "" } cat < Houyhnhnm EOF if [ -z "$HTTP_X_WAP_PROFILE" ]; then echo '' fi cat < EOF weather section "CSM" \ 'http://www.csmonitor.com/textedition' \ 'http://rss.csmonitor.com/feeds/csm' section NPR \ 'http://thin.npr.org/t.php?tid=1001' \ 'http://www.npr.org/rss/rss.php?id=1001' section AJE \ 'http://m.aljazeera.net' \ 'http://www.aljazeera.com/Services/Rss/?PostingId=2007731105943979989' section "Ars Technica" \ 'http://m.arstechnica.com/' \ 'http://feeds.arstechnica.com/arstechnica/index?format=xml' section "Top Stories" \ 'http://news.google.com/m?pz=1&cf=all&ned=us&hl=en' \ 'http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&gwt=on&output=rss' section "World News" \ 'http://news.google.com/m?pz=1&cf=all&ned=us&hl=en&topic=w' \ 'http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&topic=w&output=rss' cat < EOF