1stMud4.5.3/
1stMud4.5.3/backup/
1stMud4.5.3/bin/
1stMud4.5.3/bin/extras/
1stMud4.5.3/data/i3/
1stMud4.5.3/doc/1stMud/
1stMud4.5.3/doc/Diku/
1stMud4.5.3/doc/MPDocs/
1stMud4.5.3/doc/Rom/
1stMud4.5.3/notes/
#!/bin/bash
#
# Search A and replace with B in files C.
#

if [ -z $1 ]; then
echo Search for what?
exit
fi

if [ -z $3 ]; then
echo In what files?
exit
fi

for filex in $3
do
    ex - ${filex} <<EOF   
%s/$1/$2/g
wq!
EOF
done 
echo $1 replaced with $2 in $3.
exit