Showing multiple methods to convert a string to lowercase or uppercase.
Parameter expansion
# Convert to lowercase
a='Hello World';echo ${a,,}
# Convert to uppercase
a='Hello World';echo ${a^^}
awk
# Convert to lowercase
echo 'Hello World' | awk '{print tolower($0)}'
# Convert to uppercase
echo 'Hello World' | awk '{print toupper($0)}'
tr
# Convert to lowercase
echo 'Hello World' | tr '[:upper:]' '[:lower:]'
# Convert to uppercase
echo 'Hello World' | tr '[:lower:]' '[:upper:]'
sed
# Convert to lowercase
echo 'Hello World' | sed 's/.*/\L&/'
# Convert to uppercase
echo 'Hello World' | sed 's/.*/\U&/'