Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2001 10:12:45 +1100
From:      Tony Landells <ahl@austclear.com.au>
To:        "gerald stoller" <gerald_stoller@hotmail.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: stty -echo 
Message-ID:  <200102262312.KAA07601@tungsten.austclear.com.au>
In-Reply-To: Your message of "Mon, 26 Feb 2001 15:56:56 CDT." <F14Jn1nzZ1pNHOLQ2lA0001587f@hotmail.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
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  
<undef> <undef> <undef> <undef> <undef> <undef> <undef> 

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 = <undef>;
        eol2 = <undef>; 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 = <undef>;
        eol2 = <undef>; 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 = <undef>;
        eol2 = <undef>; 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 = <undef>;
        eol2 = <undef>; 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 = <undef>;
        eol2 = <undef>; 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 = <undef>;
        eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
        min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
        stop = ^S; susp = ^Z; time = 0; werase = ^W;

-- 
Tony Landells					<ahl@austclear.com.au>
Senior Network Engineer				Ph:  +61 3 9677 9319
Australian Clearing Services Pty Ltd		Fax: +61 3 9677 9355
Level 4, Rialto North Tower
525 Collins Street
Melbourne VIC 3000
Australia



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102262312.KAA07601>