Terminal command to rename files in bulk with wild cards?
myfile.r01.1
myfile.r02.1
so that the new names were
myfile.r01
myfile.r02
In DOS this would be accomplished easily by using the command line:
rename myfile.r??.1 myfile.r??
In OS X Terminal/Bash shell, though I couldn't find a command that has similar function that allows the use of wild cards in the file names.
I tried both the 'mv' abd 'cp' commands along the lines of:
mv myfile.r??.1 myfile.r??
but nothing worked, even using the * for the wildcard.
I did manage to use the Automator to accomplish the task by using some of its Finder options, but really, a simple command line would have been simpler and easier than building an Automator workflow for this.
Can anyone point me to a unix command that would have done what I am looking for, and the proper syntax for it?
Thanks.
Mac Pro 4gb, dual 23" Cinema Display, Mac OS X (10.4.9), MacBook Pro 15" 60gb Video iPod 8gb iPhone