#!/bin/sh for f in *.shtml do sed 's%al="/diveBC/%al="/diveBC/sites/%' $f > fixem.tmp && mv fixem.tmp $f done