Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail From: Chet Ramey Newsgroups: gnu.bash.bug Subject: Re: Design question(s), re: why use of tmp-files or named-pipes(/dev/fd/N) instead of plain pipes? Date: Mon, 19 Oct 2015 16:28:35 -0400 Lines: 35 Approved: bug-bash@gnu.org Message-ID: References: <56218DA5.8030501@tlinx.org> <5622CDC8.2030102@case.edu> <5622EB23.6020700@tlinx.org> <56242D11.3050106@case.edu> <20151019173600.GA4013@localhost> Reply-To: chet.ramey@case.edu NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1445286540 28118 208.118.235.17 (19 Oct 2015 20:29:00 GMT) X-Complaints-To: action@cs.stanford.edu Cc: Linda Walsh , bug-bash , chet.ramey@case.edu To: Ken Irving Envelope-to: bug-bash@gnu.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <20151019173600.GA4013@localhost> X-Junkmail-Status: score=10/60, host=mpv5.cwru.edu X-Junkmail-Whitelist: YES (by domain whitelist at mpv2.tis.cwru.edu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 129.22.105.37 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11712 On 10/19/15 1:36 PM, Ken Irving wrote: > The manpage section on process substitution could perhaps present the > concept more clearly by starting with something like the sentence just > above, e.g., very roughly: > > Process Substitution, taking the form of <(list) or >(list), > expands the process list to a filename, allowing the construct to > be used in place of a filename for output or input to a command. > It is supported on systems that support named pipes (FIFOs) or the > /dev/fd method of naming open files. ... > > The section goes right into what seems like implementation details, and > the use of it is only mentioned in the fourth sentence or so. Good suggestion. How about something like this: Process substitution allows a process's input or output to be referred to using a filename. It takes the form of <(list) or >(list). The process list is run asynchronously, and its input or output appears as a filename. This filename is passed as an argument to the current com- mand as the result of the expansion. If the >(list) form is used, writing to the file will provide input for list. If the <(list) form is used, the file passed as an argument should be read to obtain the output of list. Process substitution is supported on systems that sup- port named pipes (FIFOs) or the /dev/fd method of naming open files. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/