Skip to content

Instantly share code, notes, and snippets.

@Juszczak
Created June 29, 2018 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Juszczak/0f3fb15bbb0217534c3eb652f263cbf2 to your computer and use it in GitHub Desktop.
Save Juszczak/0f3fb15bbb0217534c3eb652f263cbf2 to your computer and use it in GitHub Desktop.
Decamelize string in bash
#!/usr/bin/env bash
sed -e 's/\([A-Z]\)/-\1/g' -e 's/^-//' <<< "$@" | awk '{print tolower($0)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment