I have a directory of songs all of which are from the same singer. I want to rename all the files in the directory as:
SingerName(1)
SingerName(2)
SingerName(3)
...
Just like we could do in Windows by selecting files and pressing F2 or clicking on rename in the right-click menu for the selected files.
But this does not seem to work in Ubuntu 12.04! How can I rename a group of files?
n=0; for f in *; do printf -v new "SingerName(%01d$((++n)))"; echo mv -v -- "$f" "$new"; done
(removeecho
after testing)