Gennady Bystritsky wrote in post #1127842:
> On Nov 18, 2013, at 11:57 PM, Previn Lin <lists / ruby-forum.com> wrote:
>
>>> Maybe you could achieve what you are looking for by wrapping it in
>> With modification as below, it can get right results.
>> So, is there way can source the csh file and still can get the set env
>> virables in current shell?
>
> %x[ csh -c 'source test.csh; env' ].lines.each do |_line|
>    ENV.store *_line.chomp.split('=', 2)
> end

Thanks, Gennady, get all env virables by run shell command env,process 
and store with Ruby ENV commands, it works, many thanks.

-- 
Posted via http://www.ruby-forum.com/.