diff --git a/bash/sources/12_shortcuts b/bash/sources/12_shortcuts index 0b90369..16c69b7 100755 --- a/bash/sources/12_shortcuts +++ b/bash/sources/12_shortcuts @@ -17,3 +17,17 @@ function kres { kubectl get $1 -A $_O | grep "$_D*$2$_D*\s\+$_D*$3$_D*" fi } + +function pwgen { + local _LEN=$1 + case $_LEN in + ''|*[!0-9]*) + echo "Enter a valid number" > /dev/stderr + return 1 + ;; + esac + LC_ALL=C tr -dc '[:graph:]'