> > "Eugene L. Vorokov" wrote:
> > >
> > > I have a script which is supposed to convert all filenames to lowercase
> > > recursively from current directory. It looks like:
> > >
> > > echo "Processing files"
> > > for i in `ls |grep [A-Z]`; \
> > >     do mv $i `echo $i |tr [A-Z] [a-z]`; echo $i;\
> > >     done;
> 
> ls |grep [A-Z] | while read i; \
>     do mv $i `echo $i |tr [A-Z] [a-z]`; echo $i;\
> done
> 
> >
> > > for i in `find . -name "*" -type d -maxdepth 1`;\
> > >     do if [ $i != "." ]; then cd $i; echo "Processing sub-dir $i"; $0; cd ..; fi 
>\
> > >     done;
> 
> find . -name "*" -type d -maxdepth 1 | while read i; \
>     do if [ $i != "." ]; then cd $i; echo "Processing sub-dir $i"; $0; cd ..; fi \
> done

This way it works fine, thanks !

Regards,
Eugene


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to