I need a script that will replace all occurances of a string in all filenames and foldernames, recursively.
Right now I have this script:
for f in `find -name *eye*`; do
echo processing $f
g=`expr "xxx$f" : 'xxx\(.*\)' | tr 'eye' 'm'`
mv "$f" "$g"
done
The problem is that tr replaces the characters e and y with m instead of the string "eye".
I adapted this from http://webxadmin.free.fr/article/shell-rename-all-files-in-subdirectories-to-lowe-135.php
so I don't really know what the regular expressions in expr are doing.
It is aggravating because I am so close, but I can't get it to work.