Last active
December 15, 2024 00:16
-
-
Save Justman100/239710c5764f6cae9b70a7daf042f70c to your computer and use it in GitHub Desktop.
GenerateRandomString
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 [[ $1 ]]; then | |
| length=$1 | |
| else | |
| length=64 | |
| fi | |
| tr -dc A-Za-z0-9_ < /dev/urandom | head -c $length | xargs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment