From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linc.cis.upenn.edu ([130.91.6.8]) by hawkwind.utcs.toronto.edu with SMTP id <2689>; Fri, 10 Jul 1992 11:29:57 -0400 Received: from SAUL.CIS.UPENN.EDU by linc.cis.upenn.edu id AA03089; Fri, 10 Jul 92 11:29:49 -0400 Return-Path: Received: from LOCALHOST.upenn.edu by saul.cis.upenn.edu id AA02086; Fri, 10 Jul 92 11:29:49 EDT Posted-Date: Fri, 10 Jul 92 11:29:48 -0400 Message-Id: <9207101529.AA02086@saul.cis.upenn.edu> To: rc mailing list Cc: mjd@central.cis.upenn.edu Subject: Y-shaped pipeline In-Reply-To: Your message of "Thu, 09 Jul 92 18:08:57 EDT." <199207092208.AA00518@betty.cs.widener.edu> Date: Fri, 10 Jul 1992 11:29:48 -0400 From: Mark-Jason Dominus I have a program, `why', which expects to write output to file descriptors 4 and 5. why >[4] descriptor-four-log >[5] descriptor-five-log works fine; the data that `why' writes to desriptor 4 winds up in `descriptor-four-log', and the data that `why' writes to descriptor 5 goes to the file `descriptor-five-log'. Now I want the descriptor 4 data to be piped into the stdin of some command, say `rev', and I want the descriptor 5 data to be piped into another command, say `cat -n'. This doesn't work: why |[4] rev |[5] cat -n because that means to connect descriptor 4 of `why' to descriptor 0 of rev, and then to connect descriptor 5 of rev to descriptor 0 of cat -n. How can I connect a command to two pipes at once?