In Bash 4, to lowercase:
var = 'Hello, World' echo ${var,,}
hello, world
and to uppercase:
var = 'Hello, World' echo ${var^^}
HELLO, WORLD