Jeff Elkins <[EMAIL PROTECTED]> [2003:09:20:17:06:26-0400] scribed:
> I need to convert a bunch of filenames to uppercase. I tried the script below, 
> which does...nothing.
> 
> #!/bin/sh
> for file in $*
>  do
>  if [ -f $file ]
>  then
>   ucfile=`echo $file | tr [a-z] [A-Z]`
>   if [ $file != $ucfile ]
>   then
>   mv -i $file $ucfile
>   fi     
>  fi
>  done
> 
> Any tips?

for mds in *
do
mv $mds `echo $mds | tr [:lower:] [:upper:]`
done

for mds in *
do
mv $mds `echo $mds | tr a-z A-Z`
done


-- 
Best Regards,

mds
mds resource
877.596.8237
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to