mkpasswd reviewed
This commit is contained in:
parent
98e580f814
commit
4ad93964d0
1 changed files with 5 additions and 1 deletions
6
zshrc
6
zshrc
|
@ -34,9 +34,13 @@ runfor() {
|
||||||
|
|
||||||
mkpasswd() {
|
mkpasswd() {
|
||||||
LEN=${1:-30}
|
LEN=${1:-30}
|
||||||
cat /dev/urandom | base64 | head -n 1 | cut -c -$LEN
|
base64 < /dev/urandom | fold -w $LEN | sed 1q
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mkpasswd2() {
|
||||||
|
LEN=${1:-30}
|
||||||
|
tr -cd ' -~' < /dev/urandom | fold -w $LEN | sed 1q
|
||||||
|
}
|
||||||
|
|
||||||
export EDITOR="vim"
|
export EDITOR="vim"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue