bash capitalize first letter code example
Example: uppercase first str bash
foo="bar"
echo "$(tr '[:lower:]' '[:upper:]' <<< ${foo:0:1})${foo:1}"
#returns 'Bar'
foo="bar"
echo "$(tr '[:lower:]' '[:upper:]' <<< ${foo:0:1})${foo:1}"
#returns 'Bar'