How to change Lowercase text to Uppercase text in Linux using tr command


Lets imagine you have a file named testfile inside your Linux system

Here is the content for the file testfile

[root@localhost Desktop]# cat testfile
linus torvalds
biil gates
tuna tore
java linux
testing uppercase lowercase
If you need to change the case to uppercase use tr command like the following
[root@localhost Desktop]# tr '[a-z]' '[A-Z]' < testfile
LINUS TORVALDS
BIIL GATES
TUNA TORE
JAVA LINUX
TESTING UPPERCASE LOWERCASE

tr command description

DESCRIPTION
       Translate, squeeze, and/or delete characters from standard input, writ-
       ing to standard output.
Advertisements

2 thoughts on “How to change Lowercase text to Uppercase text in Linux using tr command

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s