Anuerin G. Diaz wrote:

>sorry, i copied it without checking first. here is the script that
>works..
>
>#-----------------START
>#!/bin/bash
>
>for i in *
>do
>  mv "$i" "`echo "$i" | tr A-Z a-z`"
>done
>
>echo "finished translating"
>#------------------END
>
>or the one-liner 
>
>   $ for i in *; do mv "$i" "`echo "$i" | tr A-Z a-z`"; done.
>  
>
>>    
>>
>
>  
>
Great things, it works, here is my effort,
# cd /mnt/ext2-vol6/downloads2/digitalcam/set00

set002]# !/bin/bash
bash: !/bin/bash: event not found
no, that's wrong, lets try,

set002]# for i in *
> do
>   mv "$i" "`echo "$i" | tr A-Z a-z`"
> done
set002]#

one slight question though,in your example:-
for i in *
do
mv "$i" "`echo "$i" | tr A-Z a-z`",
this is how it came to me,

can this be one line , something like this,
for i in *  mv "$i" "`echo "$i" | tr A-Z a-z`",

I've run out of files to test it on for now.
very useful command I shall keep this one.

John


-- 
John Richard Smith
[EMAIL PROTECTED] 




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to