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