tr uppercase to lowercase code example
Example 1: tr lowercase uppercase
tr '[:lower:]' '[:upper:]'
Example 2: translate lower to upper in unix
Just use tr command to transform lowercase letters into uppercase as:
tr a-z A-Z < file.txt #transforms letters into uppercase in a file
echo 'HELLO' | tr A-Z a-z #Outputs: 'hello'
Example 3: tr replace
#Just define the replacement
tr [to_be_replace] [replacement] file.txt
#For example
tr a-z A-Z file.txt