Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: help with 'rename' function
- X-seq: zsh-users 1600
- From: Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: help with 'rename' function
- Date: Sat, 13 Jun 1998 01:07:44 +0200
- In-reply-to: <199806120816.EAA22173@xxxxxxxxxxxxxxx>; from Timothy J Luoma on Fri, Jun 12, 1998 at 04:15:57AM -0400
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxxx
- References: <199806120816.EAA22173@xxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxx
<>< WWW: http://home.pages.de/~jeanluc/
IRC: jeanluc
LCARS --- Linux for Computers on All Real Starships
Messages sorted by:
Reverse Date,
Date,
Thread,
Author