Hi all,
Im new to bash scripts, and I was trying to do a password generator script. Everything went fine but, the output I get is always separated by spaces and I need it all together. Any ideas about how to make this?
Code:
#!/bin/bash
X=0
VALUES=(
q w e r t y u i o p a s d f g h j k l z x c v b n m Q W E R T Y U I O P A S D
F G H J K L Z X C V B N M 1 2 3 4 5 6 7 8 9 0 ! @ # $ % ^ & * ( )
)
while [ $X -lt 8 ];do
PASS[X]=${VALUES[$[($RANDOM % 65)]]}
X=$(($X + 1))
done
PASSWORD=${PASS[*]}
echo $PASSWORD
Thanks a lot,
Carlos.