I have a tcl script that needs to checks the version and license (among other things) of a tool that is used within the script.
I can check to see what the environment variables are by simply:
puts $::env(VERSION_PATH)
And it would return the same value that would result from:
# VV Ran outside the script VV
printenv | grep VERSION_PATH
But if the compare portion of my code fails, I would like to give VERSION_PATH the correct value.
So I have been trying a variety of different commands to achieve this:
set env(VERSION_PATH) /tool/bin/misc_path
set ::env(VERSION_PATH) /tool/bin/misc_path
puts "export VERSION_PATH=/tool/bin/misc_path"
I am fairly new to linux/shells so if this is something that just can't be done, I'd just like to know :)
Any advice/suggestions would be greatly appreciated.
Thank you
envarray. If you change any values in theenvarray, the real environment variables won't be affected. When the process ends, your changes are lost. If your process starts child processes, they will get a copy of your changed environment, but that's as far as you can get.WM_SETTINGCHANGED, so its probably not what you are looking for (see msdn.microsoft.com/en-us/library/windows/desktop/… if you need to know more).