reading OS environment variables

Learning APL or new to Dyalog? Ask "silly" questions here, without fear...
Post Reply
haupz
Posts: 10
Joined: Mon Jul 02, 2018 7:28 am

reading OS environment variables

Post by haupz »

Hello,

say I have an env variable set at OS level, e.g.,

Code: Select all

export MY_VAR=something
, and want to read that variable's value in Dyalog. How do I to that?

(Things I found about "environment variables" are usually about the Dyalog env vars, not about pulling in OS env vars.)

Thanks,

Michael
JohnS|Dyalog

Re: reading OS environment variables

Post by JohnS|Dyalog »

Hi Michael,

Code: Select all

      ⎕ ← 2 ⎕NQ '.' 'GetEnvironment' 'MY_VAR'
haupz
Posts: 10
Joined: Mon Jul 02, 2018 7:28 am

Re: reading OS environment variables

Post by haupz »

Hi John,

thank you, that's interesting. The pointer to the ⎕NQ function made for some new discoveries. :-)

Best,

Michael
Post Reply