The problem with your initial approach is that you were setting the environment variable only in the new instance of bash that you created by running the script. Once your script was finished running, this version of bash was destroyed, along with your settings. Using the source (or .) command fixes this problem. -- rmjokers