summaryrefslogtreecommitdiff
path: root/fmt/train
blob: b4197070ae82bd9491633b00de88c665d3d92017 (plain) (blame)
1
2
3
4
#!/bin/sh
# train: CONVERT-A-STRING-INTO-TRAIN-CASE

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