[Gllug] ADVERT: Shell Scripting book

Steve Parker steve at steve-parker.org
Wed Jul 20 22:16:46 UTC 2011

On 20/07/11 21:58, Steve Parker wrote:
> On 20/07/11 21:50, Alain Williams wrote:
>> On Wed, Jul 20, 2011 at 09:40:17PM +0100, Steve Parker wrote:
>>> On 20/07/11 21:33, Nix wrote:
>>>> On 20 Jul 2011, Steve Parker outgrape:
>>>>> All shell variables are environment variables;
>>>> Certainly not. All environment variables are shell variables, though.
>>> You may not be interactively using the environment, but the two things
>>> are the same,
>> Try the following:
>>     foo=bar
>>     echo $foo
>>     env|grep foo
>>     export foo
>>     env|grep foo
> Here $foo has not been exported to env, but $foo is still a variable 
> in your current running shell.
> env is not a shell builtin; it does not report on your shell's state, 
> but on what your shell exports to called programs. 
I think that this is where I was unclear.  I should have made explicit 
that the state of the given process is modified, but not exported to the 
current process's environment which is what is passed on to its children.
Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list