From: Brian Candler Date: 2007-02-10T22:37:32+09:00 Subject: Re: ENV['COLUMNS'] On Sat, Feb 10, 2007 at 08:25:09PM +0900, pedro mg wrote: > in irb I can have access to ENV['COLUMNS'] for the # of columns in the > shell, and works fine. > But inside a script (ruby script.rb), I can't have access to that hash > key and value. > I've done a: > > puts ENV.to_a > > and i can not see both COLUMNS and LINES > What would be the problem ? Nothing to do with ruby... brian@mappit:~$ echo $COLUMNS 80 brian@mappit:~$ printenv | grep COLUMNS brian@mappit:~$ This is a shell-internal variable, and not exported by default to processes launched from the shell. But it can be if you wish: brian@mappit:~$ export COLUMNS brian@mappit:~$ printenv | grep 80 COLUMNS=80 brian@mappit:~$ Brian.