portable xkcd936 passphrase generator

This commit is contained in:
Loic Nageleisen 2015-06-10 09:48:09 +02:00
parent c9eb9441d4
commit 1eaa4f6f04

13
xkcd936 Executable file
View file

@ -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