#!/bin/sh

TMPFILE=`mktemp`

for file in `find . -type f|grep -i .php|grep -v .new`; do
echo $file;

touch -r $file $TMPFILE;

echo "<!DOCTYPE html>" > $file.new
cat $file | grep -vi "<!DOCTYPE html" >> $file.new

touch -r $TMPFILE $file.new;

mv $file.new $file

rm $TMPFILE;

done;
