8 lines
172 B
Bash
8 lines
172 B
Bash
function random() {
|
|
if [[ $# -eq 0 ]]; then
|
|
num=32
|
|
else
|
|
num=$1
|
|
fi
|
|
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $num | head -n 1
|
|
} |