Skip to content

Instantly share code, notes, and snippets.

@TyeolRik
Created May 24, 2023 01:29
Show Gist options
  • Save TyeolRik/43fc74688df9d530a17fbcd0c7394503 to your computer and use it in GitHub Desktop.
Save TyeolRik/43fc74688df9d530a17fbcd0c7394503 to your computer and use it in GitHub Desktop.
#!/bin/bash
function snakecase_to_camelCase() {
local ret
ret=$(echo $1 | sed -E 's/_(.)/\U\1/g')
echo "$ret"
}
SomeString="snakecase_looks_very_bad"
camelCase=$(snakecase_to_camelCase "$SomeString")
echo "$camelCase"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment