I wrote a bash shell script to rename the file,
#!/bin/bash
#renaming the files
for filename in 'find . -name "PostStackTemplate*"'
do
echo $filename
newName='echo $filename | sed -e "s/TestVersion/Version2/g" $filename'
mv $filename $newName
done
When I execute this script, I am getting the output as
find . -name "PostStackTemplate*"
mv: invalid option -- n
Try `mv --help' for more information.
Am I doing something wrong.