horstMon Nov 1 23:40:36 PST 2004
> Date: Mon, 1 Nov 2004 17:43:27 -0800 > From: Hal Pomeranz <hal at deer-run.com> > To: Eugene Unix and Gnu/Linux User Group <euglug at euglug.org> > Subject: Re: [Eug-lug] Subject: Copying, moving, > whatever... using wildcards in destination : wc2fn.py > >> Actually there is a perl 'rename' program in many packages --I suggest to >> read the documentation of it and decide for yourself how 'friendly' >> it'susage seems to you :-) // i.e. I do read documentations > > I've been using the Perl rename program that Horst is alluding to for > some time now and it does most things I need it to do. One feature > that I did add in my own version of the script (attached below) is > a "-n" switch to have the script tell me what it would do with my > arguments, but not actually do the renaming. This allows me to test > my syntax before actually changing any file names. ... This is great -- we are finally talking and exchanging code ! Hal, thanks for sharing your front-end to rename. Sorry, but I would consider you as one of the 'distinguished veterans of regular expressions' as referred to in my original message (hey, accept it or not -- it's not a bad sticker :-) Now how would you transfer the perl's 'rename' to a perl's 'copy' (using destination replacement), or to a perl's anyThing source-to-destination ? My point was to have such a tool in place as a shell utility; with hooks to (or wraps to) 'cp' 'mv' 'orWhatever'. This can be done in python, perl, *sh, or C. I may have made a mistake (=offending people), by pushing python as a language to implement such a tool... Hey, if your favorite language has a better/different implementation, let us know ! - Horst