You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by Mohit Jaggi <mo...@gmail.com> on 2017/09/22 18:54:51 UTC

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.

Re: shell interpreter variables

Posted by Mohit Jaggi <mo...@gmail.com>.
Shall I file a Jira ticket to support shared shell?

On Fri, Sep 22, 2017 at 7:28 PM, Jianfeng (Jeff) Zhang <
jzhang@hortonworks.com> 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 <mo...@gmail.com>
> Reply-To: "users@zeppelin.apache.org" <us...@zeppelin.apache.org>
> Date: Saturday, September 23, 2017 at 2:54 AM
> To: "users@zeppelin.apache.org" <us...@zeppelin.apache.org>
> 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.
>

Re: shell interpreter variables

Posted by "Jianfeng (Jeff) Zhang" <jz...@hortonworks.com>.
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 <mo...@gmail.com>>
Reply-To: "users@zeppelin.apache.org<ma...@zeppelin.apache.org>" <us...@zeppelin.apache.org>>
Date: Saturday, September 23, 2017 at 2:54 AM
To: "users@zeppelin.apache.org<ma...@zeppelin.apache.org>" <us...@zeppelin.apache.org>>
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.