问题描述:

I have script say script1 as below

setenv env1 /some/path1

source script2.csh | tee.csh

source env2/script3.csh

Script2 is as below

setenv env2 /some/path2/

# do something

Now environment variable(env2) set in script2 is not reflected in script1.

But if I remove pipe and tee command and only source script2 from script1 then script1 is able to access environment variable env2 .

Like something below

setenv env1 /some/path1

source script2.csh

source $env2/script3.csh

Here i need output to be displayed in screen and log file of script2 execution and also require environment variables to be set in terminal . Please help to generate this .

Thanks

相关阅读:
Top