[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

RE: bash script



On Monday, February 19, 2001 11:41 AM, Vani R. [SMTP:vani@xxxxxxxxxxxxxxx]
wrote:
| 
| I have around 120 files in a directory whose names are in uppercase
| letters. I want to change all these filenames to lowercase letters.
| I
| can't change it manually. I want to write a script to do the same.
| How
| do i do that? I have .c and .h files in the directory.
| Eg: TEST.C has to be converted to test.c

I would suggest this one, rather than writing a script. unzip has an option
-l (IIRC) to convert files to lowercase. So, all you need to do is this:

zip something.zip *.C *.H
unzip -l something.zip
--
Prashant TR <tr@xxxxxxxxxx>
Web: http://www.midpec.com/


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential 
and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please 
contact the sender and delete the material from any computer.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------