It would be much nicer to use set -u then you don't need to unset those global vars. Also, that empty if statement serves no purpose.


Gone.