summaryrefslogtreecommitdiff
path: root/fmt/kebab
blob: c9bbc665bcdfb9c55077052cc2a857206bb8fb20 (plain) (blame)
1
2
3
4
#!/bin/sh
# kebab: convert-a-string-into-kebab-case

echo "$1" | tr ' ' '-' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-zA-Z0-9-]//g'