convert lowercase to uppercase in shell script code example
Example 1: bash transform uppercase to lowercase
Just use tr command to transform lowercase letters into uppercase as:
tr a-z A-Z < file.txt
echo 'HELLO' | tr A-Z a-z
Example 2: bash how to convert text to lowercase or uppercase
tolower(string)
toupper(string)
awk '{print tolower($0)}' input_file
awk '{print toupper($3)}' input_file
Example 3: convert capital letters to lowercase in shell script
x="HELLO"
echo $x
y=${x,,}
echo $y
z=${y^^}
echo $z