#!/bin/csh

mkdir -p new
foreach file (*.html *.htm)
  set out = new/`echo $file |sed 's/html$/php/' |sed 's/htm$/php/'`
  cat $file | sed 's/BODY/body/g' |sed 's/\/body/FINPAGE/'|sed 's/isopub/FINPAGE/'|sed 's/iso_icon/FINPAGE/'|sed -f quitarcab.sed|sed -f quitarpie.sed |sed '/FINPAGE/d' | sed 's/\/figs\//\/iso\/images\/latex2html\//g'> temp
  cat newcab.php temp newfoot.php > $out
end
mkdir -p old
mv *.html *.htm old
mv new/*  .
#cp old/*.gif .
