Setting environment variable in shell script does not make it visible to the shell
This is how environment variables work. Every process has a copy of the environment. Any changes that the process makes to its copy propagate to the process’s children. They do not, however, propagate to the process’s parent. One way to get around this is by using the source command: source ./test.sh or . ./test.sh (the … Read more