Convert to camelCase

Convert a string to camelCase format with lowercase first letter.

Code

General
echo "$str" | sed -r 's/([-_ ]+)([a-z])/\U\2/g' | sed 's/^./\L&/'

Parameters

The string to convert

Server

More Bash Snippets