Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: rename THIS=THAT
- X-seq: zsh-users 1601
- From: Sven Guckes <guckes@xxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: rename THIS=THAT
- Date: Sat, 13 Jun 1998 13:02:58 +0200
- In-reply-to: <19980613010744.42583@xxxxxxxxxxxxxxxxx>; from Thomas Köhler on Sat, Jun 13, 1998 at 01:07:44AM +0200
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxxx
- References: <199806120816.EAA22173@xxxxxxxxxxxxxxx> <19980613010744.42583@xxxxxxxxxxxxxxxxx>
Quoting Thomas Köhler (jean-luc@xxxxxxxxxxxxxxxxx):
> > 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author