#!/bin/ksh

for i in *.html
do
  echo $i
  sed 's@../regs.cgi?\([^"]*\)@r\/\1.gif@' $i > tmp
  mv tmp $i
done
