Making all files lowercase

Shawn T. Rutledge rutledge@cx47646-a.phnx1.az.home.com
Sat, 18 Mar 2000 15:59:58 -0700


Cool.... it does pay to know about all the little utilities like tr...
the first time I wanted to do this, I wrote "lwcase.c" which simply 
called strtolower on the argument and echoed it to stdout.  Then wrote
a for loop to call that.

On Sat, Mar 18, 2000 at 03:53:11PM -0700, J. Francois wrote:
> It seems like on Sat, Mar 18, 2000 at 03:32:18PM -0700, Rick Rosinski scribbled:
> Orig Msg> I have billions of font files that I would like to change the names of -- to
> Orig Msg> make all of them have lowercase letters instead of all caps.
> Orig Msg> 
> Orig Msg> Does anybody know of such a command that can do this for all of the files at
> Orig Msg> once?  Thanks.
> Orig Msg> 
> Orig Msg> 
> Orig Msg> -- 
> Orig Msg> Rick Rosinski
> Orig Msg> http://www.rickrosinski.com
> Orig Msg> rick@rickrosinski.com
> Orig Msg> 
> 
> First things first.
> 
> DISCLAIMER: This script may or may not work as intended.
>             It is the responsibility of the user to back 
>             up files. I make no claims as to the fitness 
>             of this script for any use.
> 
> =================CUT HERE=====================
> #!/bin/bash
> #####################################
> ### Place this script in the directory
> ### containing the files to be converted
> ### from UPPERcase to lowercase names.
> ### It will create a temp directory
> ### and copy the files there with 
> ### lowercase names.
> ### Jean Francois - March 2000
> #####################################
> mkdir tmp
> for i in `ls --color=no`
> do
> ORIG_FILE="$i"
> NEW_NAME=`echo $i | tr [A-Z] [a-z]`
> echo "Moving $ORIG_FILE to $NEW_NAME"
> cp $ORIG_NAME tmp/$NEW_NAME
> done
> =================CUT HERE=====================
> 
> Jean Francois Sends...
> President & CEO MagusNet, Inc.
> MagusNet.com, MagusNet.Gilbert.AZ.US
> CTO EBIZ Enterprises, Inc.
> TheLinuxStore.com, TheLinuxLab.com, LinuxWired.net
> 480-778-1120 - Office
> 602-770-JLF1 - Cellular
> 
> 
> _______________________________________________
> Plug-discuss mailing list  -  Plug-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

-- 
  _______                                     http://www.bigfoot.com/~ecloud
 (_  | |_)  ecloud@bigfoot.com   finger rutledge@cx47646-a.phnx1.az.home.com
 __) | | \__________________________________________________________________
 Get money for spare CPU cycles at http://www.ProcessTree.com/?sponsor=5903