Created
November 1, 2018 15:44
-
-
Save golubov-andrey/c59e6187c9070883f90c53478da24b57 to your computer and use it in GitHub Desktop.
Generate password with help openssl
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
| #!/bin/bash | |
| if [ -z "$1" ] ; then | |
| charNum=10 | |
| else | |
| charNum="$1" | |
| fi | |
| openssl rand -base64 128 | egrep -o '[A-Za-z0-9]' | tr -d '\n' | cut -c1-$charNum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment