How to print all environment variables in TCL?

becks picture becks · Oct 23, 2012 · Viewed 9.8k times · Source

In TCL, how can I print all environment variables using a single line command?

Answer

TrojanName picture TrojanName · Oct 23, 2012

There is an array called env that stores all the environment variables. So you can simply do this:

puts [array get env]

or simply

parray env