Question

system: AIX6

default shell is ksh

in ~/.profile, set the env var MFE_HOME:

MFE_HOME=/home/mfe/MFE

then exec some shell scripts, "sh xxx.sh", which will judge $MFE_HOME exists or not, and it finds not.

-----> how to let it find ~/.profile 's env var $MFE_HOME?

Was it helpful?

Solution

You need to export the environment variable so that it is inherited/available to sub shells. Add export MFE_HOME in your .profile.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top