Capitalize Words

Capitalize the first letter of each word in a string (title case).

Code

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

Parameters

The string to capitalize

Server

More Bash Snippets