[How To] Convert All Lowercase Alphabetic Characters To Uppercase In Unix

[Unix] Convert All Lowercase Alphabetic Characters To Uppercase In Unix


The below tutorial will explain how to replace all lowercase characters in a file with uppercase characters.


One of the simplest ways to do it is with the use of tr (translate) command.


Syntax: tr '[a-x]' '[A-Z]' or tr '[:lower:]' '[:upper:]'


Usage: cat filename | tr '[a-x]' '[A-Z]'or
cat filename | tr '[:lower:]' '[:upper:]'

Example:
Vishal Lambe: Lowercase To Uppercase

Vishal Lambe: Uppercase To  Lowercase