How to fetch system variables
Last updated at 4:29 pm UTC on 14 January 2006
Question: Is there a way to fetch values from system variables such as $PATH, $PWD, $SHELL within Squeak?
Answer:From: David T. Lewis Sent: , Dec 22, 2003 at 10:00:49AM
If you are using Unix/Linux or Windows, you can load OSProcess from SqueakMap.
Then you can evaluate:
OSProcess thisOSProcess environmentAt: #PATH ==> the current $PATH
OSProcess thisOSProcess environment ==> a Dictionary of the environment variables