From owner-freebsd-questions Wed Feb 28 16:13:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from hotmail.com (f183.law9.hotmail.com [64.4.9.183]) by hub.freebsd.org (Postfix) with ESMTP id 5F1AA37B719 for ; Wed, 28 Feb 2001 16:13:26 -0800 (PST) (envelope-from gerald_stoller@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 28 Feb 2001 16:13:26 -0800 Received: from 12.20.190.1 by lw9fd.law9.hotmail.msn.com with HTTP; Thu, 01 Mar 2001 00:13:25 GMT X-Originating-IP: [12.20.190.1] From: "gerald stoller" To: ahl@austclear.com.au Cc: freebsd-questions@FreeBSD.ORG Subject: Re: stty -echo Date: Wed, 28 Feb 2001 19:13:25 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 01 Mar 2001 00:13:26.0230 (UTC) FILETIME=[6F89EF60:01C0A1E4] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 27 Feb 2001, Tony Landells wrote: >So what version of FreeBSD did you say you were using? > >It works fine for me on both 3.2-RELEASE and 4.2-RELEASE if I avoid >a shell with builtin line editing. So on 3.2 /bin/sh and /bin/csh >are fine, but on 4.2 /bin/csh is actually tcsh which doesn't work >because it does line editing. > >And if you really want to catch out the line-editing shells open >two windows on your FreeBSD box, find the tty on one, and then use >the other one to look at the stty settings of the first one (while >it's sitting idle at the command line): > >session1 % echo $version >tcsh 6.09.01 (Astron) 2000-01-14 (i386-intel-FreeBSD) options >8b,nls,dl,al,kan,sm,rh,color,dspm >session1 % tty >/dev/ttyp0 > >session2 $ stty -f /dev/ttyp0 >speed 9600 baud; >lflags: -icanon -iexten -echo echoe echoke echoctl >iflags: inlcr >oflags: -oxtabs >cflags: cs8 -parenb >dsusp eof lnext reprint status susp werase > > >And for the record, here's what it looks like with /bin/sh on both 3.2 and >4.2. Note that when I turn off echo, you don't get to see where I've typed >"stty -a", and when I turn echo back on you just see two'$ ' prompts in a >row because echo is still off when I type >"stty echo". >Cheers, >Tony > >$ uname -a >FreeBSD nameserver.austclear.com.au 3.2-RELEASE FreeBSD 3.2-RELEASE #3: Wed >Aug 16 17:41:12 EST 2000 >root@testfw.brokerserv.com.au:/usr/src/sys/compile/ACSFW i386 >$ echo $SHELL >/bin/sh >$ stty -a >speed 9600 baud; 24 rows; 80 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 -oxtabs >cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow > -dtrflow -mdmbuf >cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; > eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; > min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; > stop = ^S; susp = ^Z; time = 0; werase = ^W; >$ stty -echo >$ speed 9600 baud; 24 rows; 80 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 -oxtabs >cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow > -dtrflow -mdmbuf >cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; > eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; > min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; > stop = ^S; susp = ^Z; time = 0; werase = ^W; >$ $ stty -a >speed 9600 baud; 24 rows; 80 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 -oxtabs >cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow > -dtrflow -mdmbuf >cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; > eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; > min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; > stop = ^S; susp = ^Z; time = 0; werase = ^W; > >$ uname -a >FreeBSD ns1.austclear.com.au 4.2-STABLE FreeBSD 4.2-STABLE #1: Thu Feb 15 >15:57:29 EST 2001 root@freddo.austclear.com.au:/usr/src/sys/compile/FW >i386 >$ stty -a >speed 9600 baud; 24 rows; 80 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 -oxtabs >cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow > -dtrflow -mdmbuf >cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; > eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; > min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; > stop = ^S; susp = ^Z; time = 0; werase = ^W; >$ stty -echo >$ speed 9600 baud; 24 rows; 80 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 -oxtabs >cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow > -dtrflow -mdmbuf >cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; > eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; > min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; > stop = ^S; susp = ^Z; time = 0; werase = ^W; >$ $ stty -a >speed 9600 baud; 24 rows; 80 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 -oxtabs >cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow > -dtrflow -mdmbuf >cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; > eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; > min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; > stop = ^S; susp = ^Z; time = 0; werase = ^W; > The version I am using is FreeBSD 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:55 GMT 2000 jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC i386 Before you wrote, I had tried using two windows, but I hadn't tried /bin/sh . I nearly always use ksh . I found some more strange operation when I used two windows; I believe that one window can check on another's settings by using stty -f /dev/ttyX (with the appropriate value for X ), but this always showed -echo no matter how the window was set and even though I did change the window's setting re echo . Even so, echo was always on at that window ( ttyX ), I could never turn it off. I tried /bin/sh recently and it behaved just as ksh did, I couldn't stop it from echoing. When I use ksh , it is set for using vi as the command-line editor; soon I may try it without that feature enabled, but at work (where I use HP-UX ) I have no problem using stty to turn echo off & on, and I have noticed the doubled prompt resulting from echo being off. I may try duplicating your commands on my system soon, it all depends on what other things I have to do. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message