From d15a5cf39f37f608f80d371aa2349be2881d4c00 Mon Sep 17 00:00:00 2001 From: Kevin Cotugno Date: Tue, 31 Oct 2017 16:57:45 -0700 Subject: [PATCH] Fix quoting --- profile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/profile b/profile index e909898..997a727 100644 --- a/profile +++ b/profile @@ -31,10 +31,10 @@ if (( !$? )) && [[ -d "$DEVPATH/go" ]]; then fi function passgen () { - local len=$1 - local lower=$2 + local len="$1" + local lower="$2" - echo $len | grep -q '^[0-9]+$' + echo "$len" | grep -q '^[0-9]+$' if (( ! $? )); then len=32 fi @@ -44,7 +44,7 @@ function passgen () { local tr2="[:lower:]" fi - cat /dev/urandom | base64 | head -c $len | tr -d "\n" | \ + cat /dev/urandom | base64 | head -c "$len" | tr -d "\n" | \ tr "$tr1" "$tr2" && echo }