bash compare string lowercase code example
Example 1: bash lowercase
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 2: bash variable lowercase
# In Bash 4.0
a=DHCP
echo "${a,,}"
# Output:
dhcp