From 8e9b5ef976f25688657a8ce812fe5bbb24f5a497 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 1 May 2022 19:38:12 -0700 Subject: [PATCH] * Resizeable passwords --- password-gen.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/password-gen.sh b/password-gen.sh index 7dc3a85..a53d178 100755 --- a/password-gen.sh +++ b/password-gen.sh @@ -1,12 +1,13 @@ #!/bin/sh +size=64 alnum() { - cat /dev/urandom | tr -dc [:alnum:] | fold -w 32 | head -1 + cat /dev/urandom | tr -dc [:alnum:] | fold -w $size | head -1 } alnum_spec() { - cat /dev/urandom | tr -dc [:alnum:]'!@#$%^&*()-_=+' | fold -w 32 | head -1 + cat /dev/urandom | tr -dc [:alnum:]'!@#$%^&*()-_=+' | fold -w $size | head -1 } _help() {