It works fine on my 8.2, try using `ls` instead of * (Use the single
quote from the key next to the one).

-----Original Message-----
From: John Richard Smith [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 8:16 AM
To: Anuerin G. Diaz; NEWBIE 1
Subject: Re: [newbie] File conversion


Anuerin G. Diaz wrote:

>hi john,
>
>  sorry for replying direct but i cant post to the list. ;-)
>
>  here is one post from the local LUG here in the Philippines which
>seems to be what you want...
>
>[quote]
>Because FAT is not case sensitive and most, if not all, UNIX
filesystems
>are. A short script I got from a list of tips as a newbie might help:
>
>    $ for i in *; do mv "$i" "`echo "$i" | tr A-Z a-z`"; done;
>
>This renames every file in the current directory to all lowercase
>filenames. I've added double-quotes around the back-ticked "converter"
>to allow it to handle filenames with embedded spaces as well.
>[/quote]
>
>ciao!
>
>John Richard Smith wrote:
>  
>
>>For reasons I need not go into, I transfer *.JPG files across from
>>Windblows to Mandrake and work on them in gimp,and
>>when I'm finished I have a montage of prints I wish to assemble
>>as a composite.
>>
>>I've hit a snag.
>>
>>Winblows names it's files in higher case.
>>Montage(the programme, part of image magic) seems only willing
>>to work with lowercase named files. There are too many to manually
>>retype.
>>
>>How can I convert windblows named *.JPG files to *.jpg named
>>files on the command line ?
>>
>>John
>>
>>    
>>
>  
>
Here is some of my first efforts,
]# cd /mnt/ext2-vol6/downloads2/digitalcam/set002

set002]# $ for i in *; do mv "$i" "`echo "$i" | tr A-Z a-z`"; done;
bash: syntax error near unexpected token `do'

set002]# $ for i in *; do mv "$i" "`echo "$i" | tr A-Z a-z`";
bash: syntax error near unexpected token `do'

set002]# $ for i in *; mv "$i" "`echo "$i" | tr A-Z a-z`"; done;bash:
syntax error near unexpected token `;'

set002]# $ for i in * do mv "$i" "`echo "$i" | tr A-Z a-z`"; done;
bash: syntax error near unexpected token `;'


As a bash script newbie I'm obviously doing something
quite wrong here. Any idea what it is, as I think this
will work when I learn how to prpoperly execute it.
Incidentally, I note there is a pipe so it's a two
part operation inwhich the standard output of the first part is fed
directly into the standard input of the second
element.
John



-- 
John Richard Smith
[EMAIL PROTECTED]
  

-+-+-+-+-+-+-+- Business Computer Projects - Disclaimer -+-+-+-+-+-+-+-

This message, and any associated attachment is confidential. If you have
received it in error, please delete it from your system, do not use or
disclose the information in any way, and notify either Tony S. Sykes
or the postmaster <mailto:[EMAIL PROTECTED]>
immediately.

The contents of this message may contain personal views which are not
necessarily the views of Business Computer Projects Ltd., unless
specifically stated.  

Whilst every effort has been made to ensure that emails and their
attachments are virus free, it is the responsibility of the recipient(s)
to verify the integrity of such emails.

 
Business Computer Projects Ltd
BCP House
151 Charles Street
Stockport
Cheshire
SK1 3JY
 
Tel: +44 (0)161 355-3000
Fax: +44 (0)161 355-3001
Web: http://www.bcpsoftware.com <http://www.bcpsoftware.com/> 

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

Reply via email to