rer - regular expression based file renamer
rer /pattern/replacement/modifiers file [file [...]]
Each given file is matched against pattern; if match is found the file is renamed.
Tested system: FreeBSD 9.3
Requirements (build): bmake, pcre
License: 2-clause BSD
rename all IMG* files to picture* (e.g. IMG_1000.jpg to picture_1000.jpg)
rer /IMG/picture/ IMG*
Swap first word with second (renaming foo-bar to bar-foo, foo-123 to 123-foo)
rer '/(\w+)-(\w+)/\2-\1/' foo-bar foo-123
It runs fine on my FreeBSD system, but it's very early stage and I'm not sure it will compile on Linux - bmake is used to build project.
I've pushed code to github:
Hope it will be usefull.