Sed is a useful tool for editing strings on the command line. Changing characters to uppercase or lowercase can be done easily with this tool by simply adding one or more of the following to your substitution string:
\L – convert all proceeding characters to lowercase
\U – convert all proceeding characters to uppercase
\E – leave all proceeding characters in their current case
First letter capitalized:
echo "aBcDe fGh" | sed 's/^./\U&\E/'
First word capitalized:
echo "aBcDe fGh" | sed 's/^[^ ]*/\U&\E/'
Whole string lower case:
echo "aBcDe fGh" | sed 's/./\L&/g'