dotfiles/zsh/functions/rand.sh

5 lines
139 B
Bash
Raw Normal View History

#quick and dirty random string generator
rand () {
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-32} | head -n 1|tr -d '\n'
}