> Sometime ago, somebody on this list gave me the following shell script. I
> hope these will help.
>
> for i in `ls`
> do
> ii=`echo $i | tr A-Z a-z`
> #ii=`echo $i | tr '[:upper:]' '[:lower:]' `
> mv $i $ii
> done
>
>
> for i in `ls`
> do
> ii=`echo $i | tr a-z A-Z`
> #ii=`echo $i | tr '[:upper:]' '[:lower:]' `
> mv $i $ii
> done
>
>
> On Wed, 3 Nov 1999, Patrick Colbeck wrote:
>
Prudence suggests you should test for the existence of the target file
before moving. She beleives this will avoid clobbering afile with Afile,
and also avoid all those annoying error messages.
She also detects a problem where there are no files. Perhaps something
like this untested code:
FLIST=`ls`
[ -z "${FLIST" ] || exit
for i in ${FLIST};do
ii=`echo $i | tr a-z A-Z`
[ -f ${ii} ] || mv $i $ii
done
--
Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.