#!/bin/tcsh

foreach f ($*)
    echo processing $f
    set links=`egrep '^<b>(up|prev|next): ' $f`
    perl -i -pe "s@<small><i>arch Meets hello-world:@<small>$links<p>\n<i>arch Meets hello-world:@" $f
end
