#!/bin/bash length=12 characters="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()" password=$(head /dev/urandom | tr -dc "$characters" | head -c "$length") echo "Generated Password: $password"tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 13 ; echo< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;#!/bin/env bash # grep 24 random chars: egrep -ioam1 '[A-Za-z0-9]{24}' /dev/urandom # echo 24 random chars: echo $(</dev/urandom tr -dc A-Za-z0-9 | head -c 24)date +%s | sha256sum | base64 | head -c 32 ; echo