for fle in `find . -name '*vs8*' | grep -v '.svn'`; do \
export newfle=`echo $fle | sed -e "s/vs8/vs10/g"`; \
if [ ! -f "$newfle" ] ; then \
cp "$fle" "$newfle"; \
else \
echo "$newfle" already exists; \
fi \
done
note the semicolons and export(to use the variable name)