bash because looping is different in sh
Merge pull request #1 from JakeMick/bugfix_bash_loop

Bash, because looping is different in sh.