[NMLUG] Newbie Move/Rename question

Kyle nmlug@swcp.com
Sat, 3 Nov 2001 19:59:34 -0700


  Ouch.  I don't know Perl..yet....now to try to understand how that
works....

-----Original Message-----
From: owner-nmlug@swcp.com [mailto:owner-nmlug@swcp.com]On Behalf Of
sarang@sarangworld.com
Sent: Saturday, November 03, 2001 5:25 PM
To: New Mexico Linux Users' Group
Subject: Re: [NMLUG] Newbie Move/Rename question


Lots of ways, but here's one:

perl -le 'for(@ARGV){print "mv $_ ${_}3"}' *.php

Do a sanity check to make sure the results look ok, and then pipe the
results to sh:

perl -le 'for(@ARGV){print "mv $_ ${_}3"}' *.php | sh

--
Sincerely, Sarang (sarang@sarangworld.com)
AOL Instant Messenger ID: JavaMath

On Sat, 3 Nov 2001, Kyle wrote:

> Date: Sat, 3 Nov 2001 16:42:42 -0700
> From: Kyle <chakara@gammathon.com>
> Reply-To: nmlug@swcp.com
> To: nmlug@swcp.com
> Subject: [NMLUG] Newbie Move/Rename question
>
>
>   Ok, hopefully a simple question.
>
>   I have a ton of .php files that I need to rename in mass to .php3....
>
>   I can do them 1 by 1 with the "mv" command but there must be an easier
> way.
>
>   Thanks!
>
> ------------------------------------------------------
> To UNSUBSCRIBE send a message to nmlug-request@swcp.com
> with only the word unsubscribe in the body.  More
> information can be found at www.nmlug.org/info.html
> -----------------------------------------------------
>
>

------------------------------------------------------
To UNSUBSCRIBE send a message to nmlug-request@swcp.com
with only the word unsubscribe in the body.  More
information can be found at www.nmlug.org/info.html
-----------------------------------------------------


------------------------------------------------------
To UNSUBSCRIBE send a message to nmlug-request@swcp.com
with only the word unsubscribe in the body.  More
information can be found at www.nmlug.org/info.html
-----------------------------------------------------