Re: Smart version of mv ?
Paolo Pantaleo wrote:
> with MSDOS mv (or move, i don't remember the name) you can do
> mv *.c *.cpp
> that is a quite smart thing, i think :)
>
> with Unix mv... you can't. You have to use find and sed (at least so i
> know)
>
> Is there a nice program that can do things like:
> TheSmartMove "*.c" "*.cpp"
The perl package includes the rename command, which will do what you want
$ rename s/\.c$/\.cpp/ *.c
and much more complicated things.
You can also test a substitution first with the -v -n options.
Reply to: