From: James Edward Gray II Date: 2007-08-08T05:10:25+09:00 Subject: Re: Need Solaris Help On Aug 7, 2007, at 3:04 PM, Daniel Berger wrote: > I think you're better off using this snippet that Greg Hurrell showed > you earlier this year instead of shelling out at all. I've modified it > to use the correct value of TIOCGWINSZ for Solaris: > > TIOCGWINSZ = 21608 > buf = [0, 0, 0, 0].pack('SSSS') > if $stdin.ioctl(TIOCGWINSZ, buf) >= 0 > rows, cols, xpixels, ypixels = buf.unpack("SSSS") > p rows, cols, xpixels, ypixels > else > puts "Unable to get window size" > end Can you explain why you feel the above is "better?" James Edward Gray II