Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!spool.mu.edu!samsung!noose.ecn.purdue.edu!gus17.ecn.purdue.edu!luj From: luj@gus17.ecn.purdue.edu (Jun Lu) Newsgroups: comp.unix.shell Subject: Re: HOW do you tell KSH is interactive ? Message-ID: <1991Feb28.183809.23891@noose.ecn.purdue.edu> Date: 28 Feb 91 18:38:09 GMT References: <6178@mentor.cc.purdue.edu> <5864@iron6.UUCP> <1991Feb26.041034.15149@metapro.DIALix.oz.au> Sender: root@noose.ecn.purdue.edu (ECN System Management) Organization: Purdue University School of Aeronautics and Astronautics Lines: 12 In article <1991Feb26.041034.15149@metapro.DIALix.oz.au> bernie@metapro.DIALix.oz.au (Bernd Felsche) writes: >You could test to see if stdin is connceted to a tty! > >[ -t 0 ] && echo interactive Incorrect. You can easily see this by putting this line in a script file. -- -- Jun Lu Internet:luj@ecn.purdue.edu -- -- Aeronautics & Astronautics Bitnet: luj%ecn.purdue.edu@purccvm -- -- Purdue University UUCP: pur-ee!luj -- -- W. Lafayette, IN 47907 Phone:317-494-9410 Fax:317-494-0307 --