#!/bin/csh -f

set parent_dir = $argv[1]

set files = `find $parent_dir -name "*.shtml"`

foreach filename ($files)

  ###### Check if *html contains mems-cmu

#  set html_check = `awk '/'${old_phrase}'/{printf "+"}' ${filename}`
#  echo -n ""

#  if (${html_check} != "") then
#    echo "Replacing $old_phrase with $new_phrase in file $filename"
#    sed '{s^\<html\>^^g s^\<\/html\>^^g s^\<body\>^^g s^\<\/body\>^^g}' > ./$filename.tmp <./$filename

    cp $filename $filename.tmp 
    cat temp_head $filename.tmp temp_foot >./$filename
    rm ./$filename.tmp
#  endif

end
