zsh-users
 help / color / mirror / code / Atom feed
From: Sven Guckes <guckes@math.fu-berlin.de>
To: zsh-users@math.gatech.edu
Subject: Re: rename THIS=THAT
Date: Sat, 13 Jun 1998 13:02:58 +0200	[thread overview]
Message-ID: <19980613130258.F3086@math.fu-berlin.de> (raw)
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?=

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


  reply	other threads:[~1998-06-13 11:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-12  8:15 help with 'rename' function Timothy J Luoma
1998-06-12  9:09 ` Peter Stephenson
1998-06-14 20:05   ` Paul Lew
1998-06-12  9:14 ` Bart Schaefer
1998-06-12  9:26 ` Zefram
1998-06-12  9:55 ` Hannu Koivisto
1998-06-12 23:07 ` Thomas Köhler
1998-06-13 11:02   ` Sven Guckes [this message]
     [not found]     ` <Pine.SOL.3.95.980613090415.15614A-100000@x139-110.med.umn.edu>
1998-06-15  0:37       ` zsh - rename THIS=THAT - mv $a $a:s/THIS/THAT/ Sven Guckes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980613130258.F3086@math.fu-berlin.de \
    --to=guckes@math.fu-berlin.de \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).