#!/bin/sh
#	Findmv <pat> <re> <to>
#
if [ $# -lt 3 ];then 
	echo "Usage: "$0" <pat> <re> <to>"
	echo "Warning: You must quote the parameters if they contain any"
	echo "shell wildcards; the <re> must not contain the '/' character."
	exit 1
fi

P=$1
E=$2
R=$3

find . -name "$P" -print \
	|sed -e "s/$E/mv & $R/" \
	|tee /dev/tty \
	|sh
