aboutsummaryrefslogtreecommitdiff
path: root/motus/make_dict.sh
diff options
context:
space:
mode:
Diffstat (limited to 'motus/make_dict.sh')
-rwxr-xr-xmotus/make_dict.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/motus/make_dict.sh b/motus/make_dict.sh
new file mode 100755
index 0000000..8e5a066
--- /dev/null
+++ b/motus/make_dict.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Split the given dictionnary in files containing words of given length (1 to 10)
+mkdir -p dicts
+for i in $(seq 1 10); do
+ LANG=C grep -E "^.{$i}\$" $1 > dicts/$1_$i
+done