myvar="${myvar,,}"Otherwise, use the tr (translate) command:
tr '[:upper:]' '[:lower:]' <filein >fileoutThe older style (that still works):
tr '[A-Z]' '[a-z]' <filein >fileoutThis is slightly shorted but not quite as clear. To make the contents of a bash variable lowercase:
myvar=$(echo $myvar | tr '[:upper:]' '[:lower:]')