From de0b34a66b49eecf89a8668e3a727233bba1def6 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Thu, 30 Jul 2020 11:43:18 -0400 Subject: [PATCH] change if for optargs --- salt/common/tools/sbin/soup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index d47c0f834..d2205842c 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -200,7 +200,8 @@ verify_latest_update_script() { while getopts ":b" opt; do case ${opt} in b ) # process option b - if [[ $OPTARG =~ '^[0-9]+$' ]]; then + re='^[0-9]+$' + if [[ $OPTARG =~ $re ]]; then BATCHSIZE=$OPTARG else echo "Batch size must be a number greater than 0"