diff --git a/heavy_script.sh b/heavy_script.sh index a452cbd8..49786818 100644 --- a/heavy_script.sh +++ b/heavy_script.sh @@ -66,7 +66,7 @@ do eval nextopt=${!OPTIND} # existing or starting with dash? if [[ -n $nextopt && $nextopt != -* ]] ; then - OPTIND=$((OPTIND + 1)) + OPTIND=$((OPTIND++)) ignore+=("$nextopt") else echo "Option: \"-i\" requires an argument"