yes! 'set -e' sorry. I was using "set -eux" on some scripts so got confused. "-u" will throw an error if you used an undefined variable, "-x" will echo commands, and "-e" will exit on error.

I don't mind keeping this script... I was just curious