Is it possible in linux to bind an environment variable to an existing one. The value of environment variable should change dynamically if the dependent variable is changed.
preguntado el 24 de mayo de 14 a las 14:05
AFAIK that is not possible. There are actually dos problems involved here:
an environment variable is something pasivo, nothing but a string. There is no active component to it that might execute some monitoring action. This leads to the next point:
such a monitoring actions would require some sort of service running. That is absolutely possible, a service monitoring something, however you won't have access to some other processes environment variable that way. The environment is something process specific, not session or system specific.
Aun asi if you would detect some variables content change and react to it, there is no way for you around the process boundary. The only thing you could implement is to spawn a nueva process with an environment setup to your liking.