lkml.org 
[lkml]   [2002]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: newbie
On Mon, Aug 19, 2002 at 03:30:18PM -0700, Venkat Raghu wrote:
> Hi,
>
> I have a bash script which modifies some environment
> variables and does some other housekeeping things.
> But problem is that when script finishes running,
> new values of environment variables are no longer
> visible in parent shell. So what should I do so that
> these new values are visible in parent. I don't want
> to run as ". file.sh". I have to run it as "file.sh"
> only.

The things you do in child process environments are
inheritable only to their childs, never to parent.
If they were, there would be massive security problems,
just to mention one consequence...

If you want your current shell to get the new values,
you have to do: . file.sh

> Kindly mail me at venkatraghu2002@yahoo.com
>
> Regards
> Venkat.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.040 / U:10.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site