diff --git a/xkcd936 b/xkcd936 new file mode 100755 index 0000000..fc45bdd --- /dev/null +++ b/xkcd936 @@ -0,0 +1,13 @@ +#!/bin/sh + +[ -z "$1" ] && n=4 || n="$1" + +shuffle() { + if which shuf >/dev/null 2>&1; then + shuf "$@" + else + perl -MList::Util=shuffle -e 'print shuffle <>' "$@" + fi +} + +shuffle /usr/share/dict/words | head -"$n" | xargs echo -n