Files
windows-ansible/password_gen.sh
T
2025-01-22 14:06:12 +00:00

14 lines
250 B
Bash

#!/bin/bash
declare -g PASSWORD=""
declare -gr WORDLIST="/usr/share/dict/words-custom"
END=4
for ((i=1;i<=END;i++)); do
LINE=$(($RANDOM + 1))
WORD=$(sed $LINE!d $WORDLIST)
PASSWORD+="${WORD}-"
done
PASSWORD+=$RANDOM
printf "$PASSWORD"