LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Convert character case command. (https://www.linuxquestions.org/questions/linux-newbie-8/convert-character-case-command-500795/)

angel115 11-12-2006 04:51 AM

Convert character case command.
 
Hi there,

I'm looking for a command to covert the character case. I think there is a command who do this kind of thing but i can't remumber it name.

Issue:
I have many files with some uper case character in it (which i don't want)

EX:
Code:

myfiLe.TXT
OneOtherFile.ExtEntIon

And i want them to be like as follow:
Code:

myfile.txt
oneotherfile.extention


Kind regards,
Angel.

druuna 11-12-2006 05:07 AM

Hi,

There are more ways of doing this, here are 2:

awk '{ print tolower($0)}' infile

or

tr '[A-Z]' '[a-z]' < infile

Hope this helps.

angel115 11-12-2006 05:09 AM

Thanks.

That's exactly what i was looking for.

Angel.

David the H. 11-12-2006 05:11 AM

Straight from the rename man page:

Quote:

To translate uppercase names to lower, you’d use

rename ’y/A-Z/a-z/’ *

angel115 12-28-2006 01:49 PM

Quote:

Originally Posted by David the H.
Straight from the rename man page:

Even better, thanks alot. ;) (i didn't know this command before)

Angel.


All times are GMT -5. The time now is 11:29 PM.