#!/bin/csh
rm -f tt.sed
foreach i ( *[0-9].frm.html )
  echo $i
  set j=`echo $i | sed -e 's/[0-9]//g'`
  grep "^<a name=" $i | sort -u |  sed -e 's?^.*"\(.*\)".*$?s/ORIG#\1/NEWF#\1/g?' -e "s/ORIG/${j}/" -e "s/NEWF/${i}/" >> tt.sed
end
