Post by sPost by sht=VALUE('http_proxy','111.111.111.111','ENVIRONMENT')
say ht
ht=VALUE('http_proxy',,'ENVIRONMENT')
say ht
Hm, you are very close Gert.
Yes it returns [111.111.111.111] but when I do 'echo $http_proxy'
from shell I got the same old 222.222.222.222 value.
OK. What "shell"? The shell that starts Regina?
I assume you are doing something like:
In a shell, execute regina myprog.rexx, and myprog.rexx has the above
calls to the VALUE BIF. When myprog.rexx finishes, you execute: echo
$http_proxy from the same shell?
If this is the case then the explanation I gave about which process'
environment variables get changed applies also to this case.
A call to VALUE in a Rexx program executed by regina only applies to
the process that is started when you execute the regina binary from
the shell. So just as ADDRESS SYSTEM creates a child process from
within regina, executing regina from within a shell also creates a new
child process and any changes made to that child process are lost when
that child process (regina) exits back to the parent process (the
shell).
As Florian pointed out you need the bash extension or the zsh
extension. These execute Rexx programs in the SAME process as the
shell, so any changes to the environment "stick" once the Rexx program
finishes.
Cheers, Mark.