shell interpreter variables

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

shell interpreter variables

Mohit Jaggi
Hi All,
I am using the shell interpreter and noticed that although I can see the scope is global and shared in the configuration, any shell variable set in one para is not visible in another.

e.g. 

para1 --
export x=1 #also tried x =1, without export
echo $x #prints 1

para2 --
echo $x #prints nothing

What am I doing wrong?

Cheers,
Mohit.
Reply | Threaded
Open this post in threaded view
|

Re: shell interpreter variables

Jianfeng (Jeff) Zhang

This is due to the implementation of shell interpreter. Each paragraph will launch a shell process, which means each paragraph are in separated shell sessions.




Best Regard,
Jeff Zhang


From: Mohit Jaggi <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Saturday, September 23, 2017 at 2:54 AM
To: "[hidden email]" <[hidden email]>
Subject: shell interpreter variables

Hi All,
I am using the shell interpreter and noticed that although I can see the scope is global and shared in the configuration, any shell variable set in one para is not visible in another.

e.g. 

para1 --
export x=1 #also tried x =1, without export
echo $x #prints 1

para2 --
echo $x #prints nothing

What am I doing wrong?

Cheers,
Mohit.
Reply | Threaded
Open this post in threaded view
|

Re: shell interpreter variables

Mohit Jaggi
Shall I file a Jira ticket to support shared shell?

On Fri, Sep 22, 2017 at 7:28 PM, Jianfeng (Jeff) Zhang <[hidden email]> wrote:

This is due to the implementation of shell interpreter. Each paragraph will launch a shell process, which means each paragraph are in separated shell sessions.




Best Regard,
Jeff Zhang


From: Mohit Jaggi <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Saturday, September 23, 2017 at 2:54 AM
To: "[hidden email]" <[hidden email]>
Subject: shell interpreter variables

Hi All,
I am using the shell interpreter and noticed that although I can see the scope is global and shared in the configuration, any shell variable set in one para is not visible in another.

e.g. 

para1 --
export x=1 #also tried x =1, without export
echo $x #prints 1

para2 --
echo $x #prints nothing

What am I doing wrong?

Cheers,
Mohit.