title: Tcl - Setting parent environment variables within script
body: <p>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.</p>
  
  <p>I can check to see what the environment variables are by simply:</p>
  
  <pre><code>puts $::env(VERSION_PATH) 
  </code></pre>
  
  <p>And it would return the same value that would result from:</p>
  
  <pre><code># VV Ran outside the script VV
  printenv | grep VERSION_PATH
  </code></pre>
  
  <p>But if the compare portion of my code fails, I would like to give <b> VERSION_PATH </b> the correct value.</p>
  
  <p>So I have been trying a variety of different commands to achieve this:</p>
  
  <pre><code>set env(VERSION_PATH)   /tool/bin/misc_path    
  set ::env(VERSION_PATH) /tool/bin/misc_path
  puts "export VERSION_PATH=/tool/bin/misc_path"
  </code></pre>
  
  <p><a href="http://wiki.tcl.tk/706" rel="nofollow">1st/2nd line source, under LH</a></p>
  
  <p><a href="http://wiki.tcl.tk/4282" rel="nofollow">3rd line source </a></p>
  
  <p>I am fairly new to linux/shells  so if this is something that just can't be done, I'd just like to know :)</p>
  
  <p>Any advice/suggestions would be greatly appreciated.</p>
  
  <p>Thank you </p>