HOSTNAME: environment variable or not?
Henry Spencer
henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
Fri Feb 18 17:49:42 UTC 2005
On Fri, 18 Feb 2005, bob wrote:
> > A variable which is set but *not* exported is visible within the shell
> > that set it -- and therefore gets substituted when that shell interprets a
> > command using $ in an argument -- but is not passed to the commands the
> > shell runs, so getenv() in a command won't find it...
>
> PS.
> What would be the C program call to pickup set variables? ie. a variable set
> in the shell from which you launched your C program.
There isn't one. If it's not exported, only the shell knows about it; it
is not available within commands run by the shell.
Henry Spencer
henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list