Skip to content

Instantly share code, notes, and snippets.

@drewr
Last active December 11, 2015 03:39
Show Gist options
  • Save drewr/4539485 to your computer and use it in GitHub Desktop.
Save drewr/4539485 to your computer and use it in GitHub Desktop.
#!/usr/bin/env zsh
LEN=${1:-10}
for i in {1..10}; do
</dev/urandom tr -dc a-z0-9 | head -c${LEN}
echo
done
## % ./randpass.zsh 12
## 2wmpbxoeqf94
## zuugj7vw49ca
## 4a7r28fs2v1a
## l8d496bpbttg
## 6sanot6kj9et
## cnnyx3fz2pam
## lf5452l10p2h
## 1m6ow6qyfpgr
## cz6yftly23tq
## qctty5jdverw
## %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment