Path: utzoo!attcan!uunet!know!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!att!cbnews!res From: res@cbnews.att.com (Robert E. Stampfli) Newsgroups: comp.unix.shell Subject: Re: pipe equivalent to /dev/null ??? Keywords: true and : won't work Message-ID: <1990Sep16.031035.12411@cbnews.att.com> Date: 16 Sep 90 03:10:35 GMT References: <8720001@hpdmd48.boi.hp.com> <3841@se-sd.SanDiego.NCR.COM> <13731@ulysses.att.com> Distribution: na Organization: AT&T Bell Laboratories Lines: 21 > >>Is there an equivalent 'pipe' like entity to /dev/null ? > > > >I've seen responses of > > anycommand | true > > I've been following this thread for some time, and I have > to say that neither '... | true' nor '... | :' will do the trick. > 'true' and ':' don't read their stdin, thus the process feeding them > would block and never run. Several people have commented to this effect, but it is normally not true that this sequence would block, at least not for long. Rather, "true" would execute and exit, and "anycommand" would then receive the broken pipe signal. Usually this would cause it to terminate. The net result, however, is that, although the sequence might appear to work, "anycommand" would terminate abnormally and could not be guaranteed to do any side effects which it might be expected to have done, say, after processing all of its data. -- Rob Stampfli / att.com!stampfli (uucp@work) / kd8wk@w8cqk (packet radio) 614-864-9377 / osu-cis.cis.ohio-state.edu!kd8wk!res (uucp@home)