Changing string case in bash

January 18, 2025 ยท View on GitHub

In newer versions of bash (>=4), changing string case is very intuitive.

x="baSh"
echo $x # baSh

echo ${x,,} # bash

echo ${x^^} # BASH