From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19161 invoked from network); 11 Jun 2006 19:24:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Jun 2006 19:24:47 -0000 Received: (qmail 27627 invoked from network); 11 Jun 2006 19:24:39 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Jun 2006 19:24:39 -0000 Received: (qmail 9534 invoked by alias); 11 Jun 2006 19:24:32 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10368 Received: (qmail 9525 invoked from network); 11 Jun 2006 19:24:32 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Jun 2006 19:24:32 -0000 Received: (qmail 26507 invoked from network); 11 Jun 2006 19:24:32 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 11 Jun 2006 19:24:31 -0000 Received: from torch.brasslantern.com ([71.116.105.50]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J0P00DO8N8TO889@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Sun, 11 Jun 2006 14:24:29 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k5BJOSh0006893 for ; Sun, 11 Jun 2006 12:24:28 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k5BJORxu006892 for zsh-users@sunsite.dk; Sun, 11 Jun 2006 12:24:27 -0700 Date: Sun, 11 Jun 2006 12:24:27 -0700 From: Bart Schaefer Subject: Re: Bi-directional pipe In-reply-to: <20060611150638.GP740@prunille.vinc17.org> To: zsh-users@sunsite.dk Message-id: <060611122427.ZM6891@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <4486CBA2.9030501@yahoo.fr> <060608202844.ZM10410@torch.brasslantern.com> <44893A14.9040906@yahoo.fr> <060609025143.ZM4854@torch.brasslantern.com> <20060611150638.GP740@prunille.vinc17.org> Comments: In reply to Vincent Lefevre "Re: Bi-directional pipe" (Jun 11, 5:06pm) On Jun 11, 5:06pm, Vincent Lefevre wrote: } Subject: Re: Bi-directional pipe } } Could you give an example? A correct one? No. } I'd say that's a bug in the command that starts the bidirectional } pipe. Exactly. Note that we're not really talking about "a bidirectional pipe" here. We're talking about a loop in a pipeline -- there are two pipes, each from a stdout to a stdin. It's only "bi"-directional because there are only two processes in the loop. } I don't see how commands like grep could do anything. You mean, why would anyone even think of connecting two programs this way? Side effects. Consider tee, the "w" command in sed, or anything that produces stderr output that might be interesting. More likely, though, is that someone writes a new program expecting it to work in such a loop, but without thinking through the consequences.