From: Alex Young Date: 2007-08-08T04:38:36+09:00 Subject: Re: Need Solaris Help James Edward Gray II wrote: > On Aug 7, 2007, at 1:54 PM, Alex Young wrote: > >> Douglas F Shearer wrote: >>> On 7 Aug 2007, at 19:20, James Edward Gray II wrote: >>>> I'm told the following bit of code doesn't work on Solaris: >>>> `stty size`.split.map { |x| x.to_i }.reverse >>>> >>>> James Edward Gray II >>>> >>> If it helps, the output from stty looks like the following: >>> -bash-3.00# stty size >>> unknown mode: size >>> -bash-3.00# stty >>> speed 38400 baud; -parity >>> rows = 24; columns = 80; ypixels = 0; xpixels = 0; >>> eol = -^?; eol2 = -^?; swtch = ; flush = -^?; lnext = -^?; >>> brkint -inpck -istrip icrnl imaxbel onlcr tab3 >>> echo echoe echok echoctl echoke iexten >> On FreeBSD: > > I assume the current code (using `stty size`) works on FreeBSD. Does it > not? > It does. I was aiming at something that would work everywhere. -- Alex