*BSD News Article 73262


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!serv.hinet.net!news.uoregon.edu!arclight.uoregon.edu!gatech!news.mathworks.com!fu-berlin.de!zrz.TU-Berlin.DE!news.tu-chemnitz.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: problem with unwanted CR->LF translation
Date: 9 Jul 1996 21:15:09 GMT
Organization: Private BSD site, Dresden
Lines: 29
Message-ID: <4rui4t$5ho@uriah.heep.sax.de>
References: <4rs5qm$g40@kzsu.stanford.edu>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

techie@kzsu.Stanford.EDU (Bob Vaughan) wrote:

> I'm having a problem with unwanted CR-LF translation when
> running tcsh, or bash under several versions of freebsd.
> The strange part is that trying to change stty settings in tcsh
> fail completely, while in bash they simply seem to have no effect.

What is an ``unwanted translation'' in your case?  You want to turn
off the translation, and type Ctrl-J directly for the newline?

I don't know for bash, but tcsh maintains an internal set of saved tty
settings, to recover the terminal from crashed (or poorly written)
programs that would leave it in a weird state.  I.e., as soon as you
see the shell prompt again, your tty settings have been restored to
what they have been before running an external command.  Apparently,
stty(1) is also just one external command, and thus some of its
settings will immediately be undone at the return to the shell.
(Further, both of these shells operate in command-line editing mode,
thus they use something like cbreak while being in the command loop.)

For tcsh, there's a ``setty'' builtin that is supposed to allow
altering the saved settings.  Dunno the equivalent for bash.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)