1836458 Members
2759 Online
110101 Solutions
New Discussion

uppercase and lowercase

 
SOLVED
Go to solution
Jonathan Caplette
Regular Advisor

uppercase and lowercase

Hi guys!!!

I've a little question for you!!! I've a user who want to change the name of a lot of files, I mean cahnged them to the same name exept that if the filename is "TEXT.TXT" he want it to change for "text.txt" and vice versa!!!

What I wanna know, is there a shell command that I can use to do this??? Or is there somebody who made a script to do this???

Thanks...
Jonathan
3 REPLIES 3
Jeff Schussele
Honored Contributor
Solution

Re: uppercase and lowercase

Hi Jonathon,

Check this thread

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xa0511012aa92d5118ff10090279cd0f9,00.html

BTW - I just searched the forum w/ "change case" to get it.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: uppercase and lowercase

I'll give you a hint:

echo "TeStNaMe" | tr -s "[A-Z]" "[a-z]"

I would probably use Perl myself but a find with an -exec to call a small script would work as well.
If it ain't broke, I can fix that.
Jonathan Caplette
Regular Advisor

Re: uppercase and lowercase

OK thanks a lot guys!!!

I'm gonna do a script with Clay's answer, and in Jeff one's there are some good help to...