Re: How to set environment variable
- From: chas.owens@xxxxxxxxx (Chas. Owens)
- Date: Thu, 27 Sep 2007 12:08:51 -0400
On 9/27/07, hwigoda@xxxxxxxxxxxxxx <hwigoda@xxxxxxxxxxxxxx> wrote:
can't you set the environmental variables for the parent shellsnip
by running a script as a . or here file?
When you use Korn, Bourne, BASH, etc. and say ". " or "source " before
a script, it runs in the current process (i.e. the interpreter is the
same one that responds to you interactively). Any command in the
script is handled as if you had typed it into the command line. This
is why shell scripts run with ". " can modify the environment. If
your shell could execute Perl code then Perl would be able to modify
the environment as well, but most shells cannot execute Perl code
natively (the only ones I am aware of are zoidberg* and psh**) and
must open a new process for the Perl interpreter.
* http://search.cpan.org/dist/Zoidberg/lib/Zoidberg.pm
** http://sourceforge.net/projects/psh/
.
- References:
- Re: How to set environment variable
- From: hwigoda
- Re: How to set environment variable
- Prev by Date: running cgi off the command line works, but running on the browser fails with a 500 error
- Next by Date: Re: running cgi off the command line works, but running on the browser fails with a 500 error
- Previous by thread: Re: How to set environment variable
- Next by thread: Re: Re: How to set environment variable
- Index(es):
Relevant Pages
|