Extracted exit code logic to a function
Extracted exit code logic to a function

Easier to read the code this way. Thanks to Mikel for the tip <http://unix.stackexchange.com/questions/11156/re-escape-brackets-in-ps1/11159#11159>

sukhmel/linux.scripts,sukhmel/linux.scripts