On Wed, 2003-08-13 at 12:39, Christopher Sawtell wrote:
> for f in `ls`
> do
> LC_FILENAME=`echo $f | tr 'A-Z' 'a-z'`
> mv $f  $LC_FILENAME
> done

A very minor nitpick would be potential name collision, in case there
already existed a lower-case-named file with the same 'name' as an
uppercase example.

The owner of the files should probably know the naming standards used,
and be "sure" that there isn't a problem in advance.

This is a good reason for not distributing shell commands as "programs"
- people expect much more error checking from a program!

Oh, and this also isn't recursive ... 'find' might be OK, but
remembering the damn syntax for find's
'invoke-an-executable-on-the-found-file' always takes me longer than
scripting something ...


Reply via email to