diff options
Diffstat (limited to 'fmt/snake')
-rwxr-xr-x | fmt/snake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fmt/snake b/fmt/snake new file mode 100755 index 0000000..e33b678 --- /dev/null +++ b/fmt/snake @@ -0,0 +1,4 @@ +#!/bin/sh +# snake: convert_a_string_into_snake_case + +echo "$1" | tr ' ' '_' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-zA-Z0-9_]//g' |