#!/usr/bin/sh for a in `find . -name "*.shtml" -print` do echo "Processing " $a perl -p -i -e 's#Curriculum/Algebra//##ig' $a done