This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This happens because when you run the shell script each one runs in its own session, and each uses its own set of env vars (there is no sharing). If you want to call a shell script an have it operate in the same session as the caller, then you have to "source" the script. One way to do that is with the "dot" command. Example: