🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #153

process substitution in zsh

#153
From: BRL102
Date: Sun, 26 Jul 1992 03:18
27 lines
1683 bytes
I've recently begun exploring zsh, and am having trouble with process substi-
tution.  Consider the following minimalist example:

   echo foo > >(cat)

Near as I can tell, this should write "foo" to echo's stdout, which will be
redirected into a named pipe.  Stdin for cat will also be redirected from that
named pipe, so it should copy "foo" to its stout.  Since cat's stdout is not
redirected, "foo" should be printed on the terminal.  Instead, "zsh: write
error: broken pipe" results.

A few possibly related examples:

   cat > >(cat)         reads a single line from the terminal but does not echo
   cat < <(cat)         terminates immediately without reading from terminal

I thought, from the documentation, that both of these should perform just like
a single "cat", with a bit of variety as to which "cat" is reading from where.
Who is confused:  me, zsh, or my Unix box?  Pertinent data:  I am version 1.0,
zsh is version 2.2.0, and my box is running SunOS 4.1.1.

Any clues?  I'm directing all followups to me directly, as me UseNet access is
a bit sporadic these days.  I promise to post a summary of all replies.


Ben Liblit   -----   "Fais que tes reves soient plus longs que la nuit."
liblit@cs.psu.edu   --   brl102@psuvm.psu.edu   --   brl102@psuvm.bitnet
Technical Details
Message-ID: <92207.231853BRL102@psuvm.psu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!rpi!uwm.edu!psuvax1!psuvm!brl102

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!rpi!uwm.edu!psuvax1!psuvm!brl102
Newsgroups: comp.unix.shell
Subject: process substitution in zsh
Supersedes: <92207.163611BRL102@psuvm.psu.edu>
Organization: Penn State University
Date: Sat, 25 Jul 1992 23:18:52 EDT
From: <BRL102@psuvm.psu.edu>
Message-ID: <92207.231853BRL102@psuvm.psu.edu>
Followup-To: poster
Lines: 27