multiline |

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

View File

@ -22,12 +22,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 $MY_PATH/diceware-wordlist.txt |
awk '/[1-6][1-6][1-6][1-6][1-6]/{ print $2 }' |
cat $MY_PATH/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