[ale] Need a "find and rename" script

Wandered Inn esoteric at denali.home.edu
Thu Aug 24 08:01:31 EDT 2000


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.





More information about the Ale mailing list