Kelley Terry wrote:
>
> Is there a way to rename multiple files all of the format
> q####_tif.bz2 to q####.tif.bz2 where the # represent digits. In other
> words I need to change the underscore "_" character to a dot "." for all the
> file names in a directory. If there is a way to do this w/o a shell script
> it would be great but I can't find one.
> --
> "It said uses Windows 95 or better, so I loaded Linux!"
> "In a world without walls and fences, who needs windows and gates?"
> Kelley Terry <[EMAIL PROTECTED]>
Here's one post from the past...
----------
Date: Sat, 19 Aug 2000 11:51:04 +0200
From: Alexander Skwar <[EMAIL PROTECTED]>
Subject: Re: [expert] Scripting- Uppercase to lowercase
Renaming...
for NAME in `find www_root -type f` ; do
mv $NAME `echo $NAME | tr '[:upper:]' '[:lower:]'
done
----------
For your needs, you would want something like...
for NAME in `find www_root -name "q*tif.bz2" -type f` ; do
mv $NAME `echo $NAME | tr '_' '.'
done
Only problem might be that *all* underscores will get changed.
Thanks... Dan.