[Gllug] ADVERT: Shell Scripting book

Alain Williams addw at phcomp.co.uk
Wed Jul 20 21:33:12 UTC 2011


On Wed, Jul 20, 2011 at 09:58:49PM +0100, Steve Parker wrote:

> 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.
> Granted, we're getting down to terminology here, but from the bash man 
> page (with my emphasis added):

That is the internal workings of bash and their description of it.
The ksh manual page contains the following:

    Environment.
       The  environment  (see environ(7)) is a list of name-value pairs that is passed to an executed program in the same way as a normal argu-
       ment list.

and then see environ(7)

Actually the bash man page contains:

    ENVIRONMENT
       When a program is invoked it is given an array of strings called the environment.  This is a list of name-value pairs, of the form name=value.

We are arguing about the difference between ''the environment'' and ''an environment'',
the second is only relevant within the shell - the first is visible outside the shell
(ie by child processes) - this is what I have understood the environment to mean in 30
odd years of playing with Unix.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>
--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list