[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Uppercasing filenames



On Sat, Sep 20, 2003 at 05:06:26PM -0400, Jeff Elkins wrote:
> 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?
> 
> TIA
> 
> Jeff Elkins
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
for i in *; do
	if test -f $i; then
		mv $i `echo $i | tr '[a-z]' '[A-Z]'`
	fi
done

fi; done



Reply to: