#! /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 "" echo "

more...

" } cat < Houyhnhnm
EOF weather 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' 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 "Ars Technica" \ 'http://m.arstechnica.com/' \ 'http://feeds.arstechnica.com/arstechnica/index?format=xml' cat < EOF