bsh // create syllabeled passwords

 function createPassword () {
    test "x$1" == "x" && return 1
    test "x$2" == "x" && return 1
    YYY=( a e i o u ei au ai eu iu ui oi)
    ZZZ=( b c d f g h j k l m n p q r s t v w x y z)
    for II in `seq 1 $CNTSYLL`; do
        RANDY=$[$RANDOM % ${#YYY[@]}];
        RANDZ=$[$RANDOM % ${#ZZZ[@]}];
    for II in `seq 1 $CNTNUM`; do
        PASS="${PASS}$(shuf -i 0-9 -n 1)"
    echo "$PASS" | grep '[[:alnum:]]'
    return $?
 createPassword 5 2

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.