dotfiles/zsh/functions/rand.sh
2019-01-09 14:03:21 -05:00

4 lines
139 B
Bash
Executable file

#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'
}