From: Alex Young Date: 2007-08-08T03:54:10+09:00 Subject: Re: Need Solaris Help 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: [alex@panama ~/noodling/rubinius]$ stty speed 38400 baud; lflags: echoe echoke echoctl pendin oflags: -oxtabs cflags: cs8 -parenb No rows or columns. How about stty -a? [alex@panama ~/noodling/rubinius]$ stty -a speed 38400 baud; 62 rows; 157 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl -oxtabs -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; eol2 = ; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; -- Alex