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