zsh-users
 help / color / mirror / code / Atom feed
From: Andre Pang <andrep-ml@vjolnir.org>
To: zsh-users@sunsite.auc.dk
Subject: Re: Renaming multiple files
Date: Sun, 16 Jan 2000 04:11:03 +1100	[thread overview]
Message-ID: <20000116041103.A1818@bozar.ihug.com.au> (raw)
In-Reply-To: <20000115105248.E868@ispi.net>; from andrei@ispi.net on Sat, Jan 15, 2000 at 10:52:48AM -0600

On Sat, Jan 15, 2000 at 10:52:48AM -0600, Andrei Zmievski wrote:

> How can I rename all files with one extension to another? For example,
> all *.phtml files to *.php.

My (fairly dumb) solution:

for i in *.phtml; do mv $i $(basename $i .phtml).php; done

It does have the advantage of being fairly easy to remember and it'll work
on any shell.  (Well, if you change $(...) to `...`, anyway.)

I'm sure somebody here can come up with an answer that'll win some
obsfucated "How to rename all files with one extension to another" zsh
content :).


-- 
: Andre Pang <andrep@vjolnir.org> - Purruna Pty Ltd - ph# 0411.882299 :
:               #ozone - http://www.vjolnir.org/ozone/                :


  reply	other threads:[~2000-01-15 17:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-15 16:52 Andrei Zmievski
2000-01-15 17:11 ` Andre Pang [this message]
2000-01-15 17:11   ` Andrei Zmievski
2000-01-16 15:31   ` Thomas Köhler
2000-01-18 15:40     ` Andy Spiegl
2000-01-18 15:41       ` Andrei Zmievski
2000-01-18 16:39         ` Renaming multiple files (OT) Andy Spiegl
2000-01-18 16:41       ` Renaming multiple files Thomas Köhler
2000-01-18 17:18         ` Andy Spiegl
2000-01-18 17:38           ` Zefram
2000-01-18 20:00         ` Peter Stephenson

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=20000116041103.A1818@bozar.ihug.com.au \
    --to=andrep-ml@vjolnir.org \
    --cc=andrep@vjolnir.org \
    --cc=zsh-users@sunsite.auc.dk \
    /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).