mirror of
https://github.com/lloeki/toolbelt.git
synced 2025-12-06 01:54:41 +01:00
portable xkcd936 passphrase generator
This commit is contained in:
parent
c9eb9441d4
commit
1eaa4f6f04
1 changed files with 13 additions and 0 deletions
13
xkcd936
Executable file
13
xkcd936
Executable 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue