Created
May 16, 2016 02:25
-
-
Save ecapuano/9476c548b8a8b9600ece17da3d522ceb to your computer and use it in GitHub Desktop.
Generate N random
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# character set to use for generating passwords | |
chars=abcdefghijklmnopqrstuvwxyz123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$% | |
# how many passwords to generate | |
count=100 | |
n=0 | |
while [ $n -le $count ] ; do | |
for i in {1..12} ; do #### 12 defines the max size of the passwords | |
echo -n ${chars:RANDOM%${#chars}:1} | |
done | |
((n++)) | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment