From 70d53d9a7584740de01cd749c87574ca60059892 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 19 May 2016 21:04:56 +0200 Subject: add dicewords --- dicewords | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 dicewords (limited to 'dicewords') 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 + -- cgit v1.2.3