[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What is a 'path'?



begin  Ben Hartshorne quote on Wed, Dec 04, 2002 at 11:42:42AM -0800:
> When you declare PATH=blerg, the variable PATH is available to the
> current shell.  Under what conditions must you export PATH?  I see it in

PATH=blerg is Bourne Shell syntax for setting a shell variable.

export PATH takes the contents of the PATH shell variable, and puts it
into the shells environment.  The environment is inherited by child
processes of the shell.

> Does the shell keep separate lists of varibles it knows about and
> variables it passes on to subshells?  why?

Yes.  Because shell variables are useful in shell programming, but not
useful in the program environment.

> Could someone say exactly what the export PATH part does and under what
> conditions it's necessary?

Hope that helps,

M

Attachment: pgpYDDUUf6l58.pgp
Description: PGP signature


Reply to: