Answers for "uppercase first str bash"

2

uppercase first str bash

foo="bar"
echo "$(tr '[:lower:]' '[:upper:]' <<< ${foo:0:1})${foo:1}"
#returns 'Bar'
Posted by: Guest on June-02-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language