chaonin
chaonin

Reputation: 237

How to let shell sh known ksh's environment variable

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?

Upvotes: 1

Views: 155

Answers (1)

D.Shawley
D.Shawley

Reputation: 59613

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

Upvotes: 1

Related Questions