Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jun 172010

Case conversion of string in Linux


To convert a string to upper case letter, you can use the following command.

# echo 'Test' | tr '[:lower:]' '[:upper:]'

On the other hand, if you want to convert from upper case to lower case, you can use

#echo 'Test' | tr '[:upper:]' '[:lower:]'

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>