Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.wizards Subject: Re: Which is more portable: stty < or stty > Message-ID: <12339@smoke.BRL.MIL> Date: 13 Mar 90 03:10:39 GMT References: <3354@muffin.cme.nist.gov> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <3354@muffin.cme.nist.gov> libes@cme.nist.gov (Don Libes) writes: >The native SunOS stty(1) acts on the device that is the current stdout >while their System V stty acts on the device that is the current stdin. >In the interest of portability, which is preferable? The former is the 7th Ed. UNIX and 4BSD behavior. System V assumes you may want to redirect the output somewhere other than the terminal being probed. Your shell scripts could attempt "stty < /dev/tty > /dev/tty" just to make sure they see the terminal no matter where stdin and stdout point. (Don't use "stty <> /dev/tty", since most shells don't support <> properly.)