Title Case

Capitalize the first letter of each word in a string.

Code

General
echo "$str" | sed 's/\b\(.\)/\u\1/g'

Parameters

The string to convert to title case

Server

More Bash Snippets