4 Jan
2006
4 Jan
'06
12:18
On Wednesday 04 January 2006 02:56, jerry bookter wrote:
Found the answer to my own question. The following shell script will do it, though it doesn't work on empty directories:
for f in `find . -type d`; do g=`expr "xxx$f" : 'xxx\(.*\)' | tr '[A-Z]' '[a-z]'` mv "$f" "$g" done for f in `find . ! -type d`; do g=`expr "xxx$f" : 'xxx\(.*\)' | tr '[A-Z]' '[a-z]'` mv "$f" "$g" done
That seems overly complicated. How about find -type f | while read i ; do mv "$i" "`echo \"$i\" | tr A-Z a-z`" ; done Should work on empty directories too. -Andi