Fix quoting
This commit is contained in:
parent
82d5947e13
commit
d15a5cf39f
8
profile
8
profile
@ -31,10 +31,10 @@ if (( !$? )) && [[ -d "$DEVPATH/go" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
function passgen () {
|
function passgen () {
|
||||||
local len=$1
|
local len="$1"
|
||||||
local lower=$2
|
local lower="$2"
|
||||||
|
|
||||||
echo $len | grep -q '^[0-9]+$'
|
echo "$len" | grep -q '^[0-9]+$'
|
||||||
if (( ! $? )); then
|
if (( ! $? )); then
|
||||||
len=32
|
len=32
|
||||||
fi
|
fi
|
||||||
@ -44,7 +44,7 @@ function passgen () {
|
|||||||
local tr2="[:lower:]"
|
local tr2="[:lower:]"
|
||||||
fi
|
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
|
tr "$tr1" "$tr2" && echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user