From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24969 invoked from network); 13 Jun 1998 11:07:51 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 13 Jun 1998 11:07:51 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id HAA12692; Sat, 13 Jun 1998 07:02:18 -0400 (EDT) Resent-Date: Sat, 13 Jun 1998 07:02:05 -0400 (EDT) Message-ID: <19980613130258.F3086@math.fu-berlin.de> Date: Sat, 13 Jun 1998 13:02:58 +0200 From: Sven Guckes To: zsh-users@math.gatech.edu Subject: Re: rename THIS=THAT Mail-Followup-To: zsh-users@math.gatech.edu References: <199806120816.EAA22173@luomat.peak.org> <19980613010744.42583@picard.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.92.8i X-Old-Subject: Re: help with 'rename' function In-Reply-To: =?iso-8859-1?Q?=3C19980613010744=2E42583=40picard=2Efranken=2Ede=3E=3B_f?= =?iso-8859-1?Q?rom_Thomas_K=F6hler_on_Sat=2C_Jun_13=2C_1998_at_01:07:44A?= =?iso-8859-1?Q?M_+0200?= X-Mailer-Info: http://www.math.fu-berlin.de/~guckes/mutt/ Resent-Message-ID: <"vNzuy1.0.i53.XmbWr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1601 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Quoting Thomas Köhler (jean-luc@picard.franken.de): > > rename foo.THIS THIS=THAT > why not use this one: > for i in *.THIS ; do mv $i `basename $i .THIS`.THAT ; done Well, this just works for a special case - "extensions". It won't work if "THIS" is somehere *within* the filenames. $ ls lahDIdah DIagnose LadyDI $ rename * DI=di $ ls lahdidah diagnose Ladydi Well, that "rename" looks much more powerful to me. :-) Sven