From: James Edward Gray II Date: 2007-08-08T04:44:43+09:00 Subject: Re: Need Solaris Help On Aug 7, 2007, at 2:38 PM, Alex Young wrote: > 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. I think it's fine just to special case Solaris since it's the only place the old code didn't seem to hold up, for now anyway. James Edward Gray II