comp.lang.ada
 help / color / mirror / Atom feed
From: Victor Porton <porton@narod.ru>
Subject: Re: Accessing Shell Variables
Date: Wed, 28 Dec 2016 21:47:13 +0200
Date: 2016-12-28T21:47:13+02:00	[thread overview]
Message-ID: <o414s0$1k8g$1@gioia.aioe.org> (raw)
In-Reply-To: 35dadef7-2aee-4cd9-b774-ab54f4698d64@googlegroups.com

ahlan.marriott@gmail.com wrote:

> I can access Windows, Linux and Osx environment variables using
> Ada.Environment_Variables.Value However Linux and Osx also have Shell
> variables. How can I access these?

You cannot access a shell variable unless it is exported. Exported shell 
variable becomes and environment variable:

xxx=yyy
./my-program  # my-program cannot (at least in an easy way) access $xxx

export xxx=yyy
# or
xxx=yyy
export xxx
./my-program  # my-program cannot access xxx environment variable

-- 
Victor Porton - http://portonvictor.org


  reply	other threads:[~2016-12-28 19:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28 18:19 Accessing Shell Variables ahlan.marriott
2016-12-28 19:47 ` Victor Porton [this message]
2016-12-28 20:51   ` Simon Wright
2016-12-28 21:38     ` Victor Porton
2016-12-29  9:42       ` ahlan.marriott
2016-12-28 19:50 ` Niklas Holsti
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox