I am working on an option driven bash script that will use getopts. The script has cases where it can accept multiple options and specific cases where only one option is accepted. While testing a few cases out I ran into this issue which I have reduced down to pseudo-code for this question.

```
for arg in "$@"; do
  echo ${arg}
done
echo "end"

```

Running below returns:

```
$ ./test.sh -a -b
-a

end

```

I am running bash 4.1.2, why isn't the -b returned on the empty line? I assume this has to do with the '-'.