1
0
Fork 0
This commit is contained in:
qo-op 2020-05-09 19:24:31 +02:00
parent 0e828c95d1
commit 9a7a2c5cfe
1 changed files with 4 additions and 4 deletions

View File

@ -6,12 +6,12 @@ WORDCOUNT=${1-$MOTS}
# Download the wordlist
# wget -nc -O ~/.diceware-wordlist http://world.std.com/%7Ereinhold/diceware.wordlist.asc 2> /dev/null
# print a list of the diceware words
cat ./diceware-wordlist.txt |
awk '/[1-6][1-6][1-6][1-6][1-6]/{ print $2 }' |
cat ./diceware-wordlist.txt | \
awk '/[1-6][1-6][1-6][1-6][1-6]/{ print $2 }' | \
# randomize the list order
shuf --random-source=/dev/urandom |
shuf --random-source=/dev/urandom | \
# pick the first n words
head -n ${WORDCOUNT} |
head -n ${WORDCOUNT} | \
# pretty print
tr '\n' ' '
echo