On Saturday 20 September 2003 2:06 pm, 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
CD to the directory the files are in, then try: for i in * ; do mv -i $i `echo $i | tr [a-z] [A-Z]` ; done -- ~~~~~~~~~~~~~~~~~~~~~~~~~ Carla Schroder www.tuxcomputing.com this message brought to you by Libranet 2.8 and Kmail ~~~~~~~~~~~~~~~~~~~~~~~~~ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]