Fix batch size regex to disallow 0

This commit is contained in:
William Wernert
2021-08-27 11:34:28 -04:00
parent c5d120293d
commit ca5339341f

View File

@@ -1023,7 +1023,7 @@ while getopts ":b:f:y" opt; do
case ${opt} in case ${opt} in
b ) b )
BATCHSIZE="$OPTARG" BATCHSIZE="$OPTARG"
if ! [[ "$BATCHSIZE" =~ ^[0-9]+$ ]]; then if ! [[ "$BATCHSIZE" =~ ^[1-9][0-9]*$ ]]; then
echo "Batch size must be a number greater than 0." echo "Batch size must be a number greater than 0."
exit 1 exit 1
fi fi