uppercase first character in a variable with bash October 11, 2022 by Tarik One way with bash (version 4+): foo=bar echo "${foo^}" prints: Bar