Convert to Pascal Case

Convert a string to PascalCase format, capitalizing each word and removing separators.

Code

General
echo "$str" | sed 's/[-_ ]\+/ /g' | sed 's/\b\(.\)/\u\1/g' | tr -d ' '

Parameters

The string to convert to PascalCase

Server

More Bash Snippets