Capitalize the 1st letter of each word
Below are two ways to proceed:
Method 1
sed-r 's /(^.|.) / \ U & / g'
Method 2
sed 's / ^. \ | [a-z] / \ U & / g'
Method 3
sed-r 's / \ <. / \ U & / g'
Examples:
$ Echo-e "good day to you | Sed-r 's /(^.|.) / \ U & / g'
Good Day To You.
$ Echo-e "hello life \ net hello to you" | sed-r 's /(^.|.) / \ U & / g'
or
$ Echo-e "hello life \ net hello to you" | sed-r 's / (\ b) / \ U & / g'
Hello Life
And Hello To You
$ Echo-e "hello life." | Sed 's / ^. \ | [A-z] / \ U & / g'
Hello Life.
$ Echo-e "hello life \ net hello to you" | sed 's / ^. \ | [Az] / \ U & / g'
Hi Life
And Hello To You