Can someone help me with this script.
I have a bunch of files like this:
"2209OS_02_Code" "2209OS_03_Code" "2209OS_04_Code" "2209OS_05_Code" "2209OS_06_Code" "2209OS_07_Code" "2209OS_08_Code" "2209OS_09_Code" "2209OS_10_Code" "2209OS_10_video"
and I want to rename them to be like this:
"ch02", "ch03", etc...
/usr/bin/find . -name 22\* -exec echo $(perl -e '$o=$ARGV[0]; $n=($o=~s/2209OS_([0-9]+)_Code/$1/g); print "ch$o"' {}) \;
My echo statement is only printing the original name such as "2209OS_02_Code" instead "ch02".
Why?
Thanks
siegfried