[ale] Need a "find and rename" script

Armsby John-G16665 John.Armsby at motorola.com
Thu Aug 24 11:30:46 EDT 2000


It Works!!!

Thanks,

John


-----Original Message-----
From: Wandered Inn [mailto:esoteric at denali.home.edu]
To: ale at ale.org
Sent: Thursday, August 24, 2000 8:02 AM
To: 'ale at ale.org'
Subject: Re: [ale] Need a "find and rename" script


Armsby John-G16665 wrote:
> 
> I have a large number of .tif files burried in a directory tree which need
> to be renamed to .g01.  I am shell script challenged.  Does anyone have a
> simple script to "find" the files which have a .tif extension and rename
> them to .g01 while leaving the other file types along?

I'm not sure about shells, this works with ksh and I think bash:

for fn in $(find . -name '*.tif' -print); do

	mv $fn ${fn%.*}.g01
done

> 
> Thanks,
> 
> John
> 
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message
body.

--
Until later: Geoffrey		esoteric at denali.atlnet.com

Microsoft != Innovation
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message
body.
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list