Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Renaming multiple files
- X-seq: zsh-users 2890
- From: Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: Renaming multiple files
- Date: Tue, 18 Jan 2000 17:41:16 +0100
- In-reply-to: <20000118164029.A27035@xxxxxxxxxxxx>; from zsh.Andy@xxxxxxxxx on Tue, Jan 18, 2000 at 04:41:10PM +0100
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <20000115105248.E868@xxxxxxxx> <20000116041103.A1818@xxxxxxxxxxxxxxxxx> <20000116163112.A29827@xxxxxxxxxxxxxxxxx> <20000118164029.A27035@xxxxxxxxxxxx>
On Tue, Jan 18, 2000 at 04:41:10PM +0100,
Andy Spiegl <zsh.Andy@xxxxxxxxx> wrote:
>
> > for i in *.phtml ; do mv $i ${i:r}.php ; done
> Nifty. But do you guys know mmv?
> It's as easy as this:
> mmv '*.phtml' '#1.php'
And, well, doesn't let zsh globbing work. Bad :-}
How do you do
for i in **/*.php(I) ; do mv $i ${i:r}.phtml ; done
with mmv?
[Of course mmv is faster as it only spawns one process instead of many]
[Let's try again with other means...
553 jean-luc@picard (ttypts/12) ~/test/zsh> zmodload files
554 jean-luc@picard (ttypts/12) ~/test/zsh> time (for i in *.php ;
do mv $i ${i:r}.phtml ; done )
( for i in *.php; do; mv $i ${i:r}.phtml; done )
0,09s user 0,61s system 94% cpu 0,739 total
We're in business again :-)]
> Bye,
> Andy.
CU,
Thomas
--
Thomas Köhler Email: jean-luc@xxxxxxxxxxxxxxxxx | LCARS - Linux for
<>< WWW: http://home.pages.de/~jeanluc/ | Computers on All
IRC: jeanluc | Real Starships
PGP public key: http://www.mayn.de/users/jean-luc/PGP-Public.asc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author