From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3879 invoked from network); 12 Jun 1998 23:09:23 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 12 Jun 1998 23:09:23 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id TAA08843; Fri, 12 Jun 1998 19:04:47 -0400 (EDT) Resent-Date: Fri, 12 Jun 1998 19:04:36 -0400 (EDT) Message-ID: <19980613010744.42583@picard.franken.de> Date: Sat, 13 Jun 1998 01:07:44 +0200 From: =?iso-8859-1?Q?Thomas_K=F6hler?= To: zsh-users@math.gatech.edu Subject: Re: help with 'rename' function Mail-Followup-To: zsh-users@math.gatech.edu References: <199806120816.EAA22173@luomat.peak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Mailer: Mutt 0.89i In-Reply-To: <199806120816.EAA22173@luomat.peak.org>; from Timothy J Luoma on Fri, Jun 12, 1998 at 04:15:57AM -0400 X-Disclaimer: Linux rulez X-Operating-System: Linux picard 2.0.32 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by math.gatech.edu id TAA08798 Resent-Message-ID: <"BuknI.0.e92.3GRWr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1600 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello, On Fri, Jun 12, 1998 at 04:15:57AM -0400, Timothy J Luoma wrote: > > I used to have a binary that did this, but I've lost it. > > What it did was simple: it changed extensions of filenames. > > For example, say you have a bunch of files which ended with .THIS and you > wanted to change them to end with .THAT > > You would do > > rename *.THIS THIS=THAT > > and it would go on its way... or if it was just one file: > > rename foo.THIS THIS=THAT Apart from using mmv (I think it should be somewhere on sunsite/mirrors), why not use this one: for i in *.THIS ; do mv $i `basename $i .THIS`.THAT ; done CU, Thomas -- Thomas Köhler Email: jean-luc@picard.franken.de <>< WWW: http://home.pages.de/~jeanluc/ IRC: jeanluc LCARS --- Linux for Computers on All Real Starships