bash convert string to uppercase

C++
# Basic syntax:
tolower(string)
toupper(string)

# Example usage:
awk '{print tolower($0)}' input_file
# This prints every row ($0) converted to lowercase

awk '{print toupper($3)}' input_file
# This would print the third field ($3) converted to uppercaseJust 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'var=hello #For Bash Version higher than 4.3.33 try these
echo ${var''} #Uppercase whole string
HELLO
echo ${var'} #Uppercase only first char of string
Hello
var2=BYE
echo ${var2,} #Lowercase whole string
bye
echo ${var2,,} #Lowercase only first char of string
bYE
echo $var | tr 'a-z' 'A-Z' #For lower versions of Bash just use tr command
HELLO
Source

Also in C++: