[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Need a "find and rename" script
- Subject: [ale] Need a "find and rename" script
- From: esoteric at denali.home.edu (Wandered Inn)
- Date: Thu, 24 Aug 2000 08:01:31 -0400
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.