[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: UPPER to lowercase.

Thanks guys. I indeed got the quotes wrong and also the space in between
the two arguments. This worked fine:

for x in *; do mv $x `echo $x | tr [A-Z] [a-z]`; done

Another lesson learnt: watch `em quotes. Using mmv is fine, but my purpose
is to learn some plain shell scripting. I'm slowly working my way through
man bash now, using mcedit as editor cause of the color coding. Cheerio,

At 05:13 PM 4/2/00 +0200, Hans wrote:
>I'm trying to get this bash script working which converts filenames from
>UPPER to lowercase. 
>for x in *; do mv $x 'echo $x|tr [A-Z][a-z]'; done;
>It comes back with 'when moving multiple files, last argument must be a
>directory.' I thought this was a loop, so how come it moves multiple files?
>Any ideas how to get this working? tnx --hans
>Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org <

Reply to: