#!/bin/sh # Fetch news headlines from UK Teletext (which are unusual in that they're # carefully written to all be the same length, so are good for putting in a # window in the corner of your desktop). # This URL points at an alevtd. page () { wget -q -O - http://localhost:5654/$1/0.txt; } unset http_proxy rpt=: while $rpt ; do (page 101 ; page 160) | perl -ne 'BEGIN{print"\n"x20;}chomp;if (/^ ([A-Z].*) \d+$/) { print "$1\n" }' | tail -n 25 rpt=false if [ $# -gt 0 ] ; then rpt=: sleep $1 fi done