#!/bin/sh
USAGE="Fixappend <orig> <new>
Fixes all files in the current directory and
subdirectories ending in .<orig> and renames them with .<new>."
if [ $# -ne 2 ]; then
printf "%s\n" "$USAGE"
exit 1
fi
all=`find . -name *.$1`
#echo All=$all
for i in $all
do
base=`echo $i | cut -d. -f1-2`
newname=$base.$2
echo mv $i $newname
mv $i $newname
done