Hey everybody.
I not sure if this can be done.
I am using this script at the moment. It a little password generator
script I was wondering if anyone could help me out.
I would like the First letter to be a Capital and the last two to be any
digits (number's)?
The one that I have puts capitals all over the place and sometimes it
does not have any number's at all.
I plan to use this for work for the I have run out of things to
put as my password and I am not aloud to have the same password twice
Quote:
#!/bin/bash
LORD="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789"
LENGTH="14"
while [ "${n:=1}" -le "$LENGTH" ]
do
PASS="$PASS${LORD:$(($RANDOM%${#LORD})):1}"
let n+=1
done
echo "$PASS"
exit
|
Thanks in advance Josh.