generate random string bash code example
Example 1: cli generate random string
#purely random 12 character string
openssl rand 12
# more useful random 12 character strings
openssl rand -base64 12
# random hex-code sequence
openssl rand -hex 12
Example 2: random string linux
tr -dc A-Za-z0-9 </dev/urandom | head -c 64 > random_text.txt