Eero S. wrote:
18:28:43 ruerue@yawn > ruby -v
ruby 1.8.5 (2006-08-25) [amd64-freebsd6]18:28:51 ruerue@yawn > 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.