On Wed, 4 Oct 2023 22:09:42 -0500, Jon Perryman wrote:

>On Thu, 5 Oct 2023 02:37:57 +0000, Seymour J Metz wrote:
>
>>The shell creates the environment variables.
>
>No. The environment variable array is created by process initialization.
>
I agree.  This is normally done by a function of the exec() family.

> The shell and programs can modify the array.
> 
Or pass a new array as one of the arguments of exec().

> I believe sub-shells in the same process use the same array.
>
I believe otherwise.  Consider:
    foo=outer export foo; ( foo=inner export foo ); echo $foo

("sub-shells in the same process" is an oxymoron.)

-- 
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to