From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9626 invoked from network); 18 Jan 2000 16:42:40 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Jan 2000 16:42:40 -0000 Received: (qmail 15475 invoked by alias); 18 Jan 2000 16:42:23 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2890 Received: (qmail 15468 invoked from network); 18 Jan 2000 16:42:22 -0000 Date: Tue, 18 Jan 2000 17:41:16 +0100 From: =?iso-8859-1?Q?Thomas_K=F6hler?= To: zsh-users@sunsite.auc.dk Subject: Re: Renaming multiple files Message-ID: <20000118174116.A3683@picard.franken.de> References: <20000115105248.E868@ispi.net> <20000116041103.A1818@bozar.ihug.com.au> <20000116163112.A29827@picard.franken.de> <20000118164029.A27035@br-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/1.1i In-Reply-To: <20000118164029.A27035@br-online.de>; from zsh.Andy@spiegl.de on Tue, Jan 18, 2000 at 04:41:10PM +0100 X-Operating-System: Linux picard 2.2.14 X-Editor: VIM - Vi IMproved 5.6 http://www.vim.org/ X-IRC: tirc-1.2; Nick: jeanluc X-URL: http://home.pages.de/~jeanluc/ On Tue, Jan 18, 2000 at 04:41:10PM +0100, Andy Spiegl wrote: >=20 > > 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 --=20 Thomas K=F6hler Email: jean-luc@picard.franken.de | 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