[PLUG] File renaming scripts?

Colin Kuskie ckuskie at dalsemi.com
Mon Nov 25 22:59:29 UTC 2002


On Mon, Nov 25, 2002 at 02:51:57PM -0800, Felix Lee wrote:
> Rob Hudson <rob at euglug.net>:
> > There's an old perl script by Larry Wall that I dropped in my bin directory.
> > It allows you to use regexes to rename files.
> 
> ren will clobber files if you're not careful, and I kept
> running into situations that it won't handle right, like
>     ren 's/\d+/$& + 1/e' 1 2 3 4
> will end up moving 1 to 4.

Of course it will.  You told it to :)
It would probably be better to say something like:

ren will let you clobber files, just like rm -f will.

Colin




More information about the PLUG mailing list