Problem scenario
EXPORT works when you use it interactively from the command prompt (e.g., bash prompt). But when you use EXPORT commands in shell scripts, they do not have the desired effect. You have a Linux script that sets environment variables. You do not want to log off your terminal or desktop session after the script runs to get the environment variables. How do you change environment variables via a shell or bash script in Linux without logging off and logging back in?
…