Read Bash environment variable in TCL

tcl
galvin Verghese picture galvin Verghese · Apr 1, 2011 · Viewed 40.9k times · Source

How to read a shell environment variable in your Tcl script. So anyone please help me. I am very new in TCL.

Answer

TrojanName picture TrojanName · Apr 1, 2011

Use $::env to access any environment variables e.g. to access the TMP environment variable do this:

set tmpdir $::env(TMP)

More info here http://wiki.tcl.tk/1624