change if for optargs

This commit is contained in:
m0duspwnens
2020-07-30 11:43:18 -04:00
parent 1c5e6fa10f
commit de0b34a66b

View File

@@ -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"