Question
· Aug 18, 2023

GetEnviron() on CentOS

Why I'm not getting OS level environmental variable in the IRIS for below actions:

CentOS termial:

[root@]# export TEST="test"
[root@]# echo $TEST
test
[root@]# iris session MYIRIS

Node: myiris01, Instance: MYIRIS

Username: User
Password: ********
NSPACE>s test = $SYSTEM.Util.GetEnviron("TEST")

NSPACE>w test

NSPACE>

Discussion (8)2
Log in or sign up to continue

export flags the variable to be available in child processes, but only affects the current account in an interactive shell.

jeff@ourawai03:~/tmp$ a="hey"
jeff@ourawai03:~/tmp$ echo $a
hey
jeff@ourawai03:~/tmp$ bash
jeff@ourawai03:~/tmp$ echo $a

jeff@ourawai03:~/tmp$ exit
exit
jeff@ourawai03:~/tmp$ export a="hey"
jeff@ourawai03:~/tmp$ bash
jeff@ourawai03:~/tmp$ echo $a
hey