If I define a variable to some value at the top level of an execline script,
there seems no way to redefine it.
Stripped down example:
#!/command/execlineb
define var 0
foreground { echo $var }
define var 1
foreground { echo $var }
export var 2
import var
foreground { echo $var }
unexport var
export var 3
import var
echo $var
# end of script
All output is "0" from the first define. If I change the first define, then
all output will be what ever I set that to.
Am I missing something basic here? If no state is maintained, should the
definition persist? The perplexing part is that I would have thought that the
lines that unexported, exported, then imported would force the redefinition.
I will work on redesigning the script I was trying to redefine a variable in.
Maybe I am making it too complex.
--
John
Received on Tue Aug 26 2014 - 02:59:42 UTC