summaryrefslogtreecommitdiff
path: root/fmt/train
diff options
context:
space:
mode:
Diffstat (limited to 'fmt/train')
-rwxr-xr-xfmt/train4
1 files changed, 4 insertions, 0 deletions
diff --git a/fmt/train b/fmt/train
new file mode 100755
index 0000000..b419707
--- /dev/null
+++ b/fmt/train
@@ -0,0 +1,4 @@
+#!/bin/sh
+# train: CONVERT-A-STRING-INTO-TRAIN-CASE
+
+echo "$1" | tr ' ' '-' | tr '[:lower:]' '[:upper:]' | sed 's/[^a-zA-Z0-9-]//g'