Generic pattern
As you can see from the answers, the generic pattern is
[Produce a set of file names to work on] | [read each name and run actionCommand]
actionCommand performs the desired action eg mv and generally takes two paramteres original file name and new file name.
producing filename
find is generally used.
To handle filenames with unusual characters the -print0 is used to terminate each string printed with the null character. However the reading sid of the pipe also needs to cooperate and read characters until null is read instead of terminating prematurely after a space.
reading each filename
Some commands can take a -0 option to handle the reading side of a null terminated character string.
The command xargs was designed for this purpose
bash has read -d\0
actionCommand
A general form cmd p1 p2 example mv oldfilename newfilename
producing the new filename
The new filename is usually derived from the original filename.
It can be as simple as appendingaappending a string, eg $oldname.New
tr is good for simple translation of characters
sed power editiding of filenames
tris good for simple translation of characterssedpower editing of filenames
bash command substition
Example $( tr "{}" _ <<< $oldname )
command output substitution $( )
command that is run tr "{}" _ with input read from variable $oldname