Many thanks to those who replied. As suggested, I contacted Stata Techinical Support. In case its of use to others, they explained to me that the env function could be used:
local x : env SGE_TASK_ID
to save an environment variable to a local macro.
Jonathan
Kit Baum <[email protected]> 20/10/09 2:00 AM >>>
previous posting can be done as a one-liner in Mata:
shell env | grep "PATH=" > /tmp/_path
mata: st_local("_path",fget(fopen("/tmp/_path","r")))
di "path is `_path'"
Kit Baum
[email protected]
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
</[email protected]>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/