Re: ENV shows partial environment only

Eero S. wrote:

18:28:43 [email protected] > ruby -v
ruby 1.8.5 (2006-08-25) [amd64-freebsd6]

18:28:51 [email protected] > set | ruby -e ‘p ARGF.readlines.map {|l|
l.split("=").first if l =~ /^[A-Z]/}.compact’

Command ‘set’ is a shell’s built-in, besides environment variables it
shows also the shell’s internal ones that happened to follow the same
syntax. Those internal ones are not inherited by a spawned process,
unless exported, it which case that are placed in the environment. On
the other hand, ‘env’ shows just environment variables, exactly same
thing will show up when you do this in Ruby:

p *ENV

Hope it helps,
Gennady.

On 2006.10.05 12:44, Gennady B. wrote:

An example session:
unless exported, it which case that are placed in the environment. On
the other hand, ‘env’ shows just environment variables, exactly same
thing will show up when you do this in Ruby:

p *ENV

Yep, clears that part, thanks–now I need to figure out WHY some things
are not getting propagated properly :slight_smile:

Thanks to Mike and Logan also.