summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdicewords11
1 files changed, 11 insertions, 0 deletions
diff --git a/dicewords b/dicewords
new file mode 100755
index 0000000..3a450fa
--- /dev/null
+++ b/dicewords
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+count=${1:-6}
+
+if [ "$count" = "-h" ]; then
+ echo "Usage: $0 [count]"
+fi
+
+egrep '^[a-z]{1,6}$' /usr/share/dict/american-english | shuf | head -n "$count" | tr '\n' '-' | sed -e 's/-$//'
+echo
+