Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.unix.wizards Subject: Re: Detecting Pipe Using Bourne Shell Message-ID: <999@philmds.UUCP> Date: 8 Apr 89 10:01:28 GMT References: <18992@adm.BRL.MIL> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 16 In article <18992@adm.BRL.MIL> ifenn%ee.surrey.ac.uk@nss.cs.ucl.ac.uk (Ian Fenn) writes: [] |The only problem with this is that I cannot pipe the output from another |program into it because it drops into the main menu and out again! Probably |due to the test for arguments. Can anyone therefore tell me how to detect a |pipe using Sh, so that the following will work? Or suggest another way |round the problem? if test -t 0 then # stdin from terminal else # stdin not from terminal fi Leo.