blob: 1272b010bac3f67e42d989e03d8efcb3bfcd40b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
<h1 class="subsection">Process Substitution</h1> <p>Process substitution allows a process’s input or output to be referred to using a filename. It takes the form of </p>
<div class="example"> <pre class="example"><(list)
</pre>
</div> <p>or </p>
<div class="example"> <pre class="example">>(list)
</pre>
</div> <p>The process <var>list</var> is run asynchronously, and its input or output appears as a filename. This filename is passed as an argument to the current command as the result of the expansion. If the <code>>(<var>list</var>)</code> form is used, writing to the file will provide input for <var>list</var>. If the <code><(<var>list</var>)</code> form is used, the file passed as an argument should be read to obtain the output of <var>list</var>. Note that no space may appear between the <code><</code> or <code>></code> and the left parenthesis, otherwise the construct would be interpreted as a redirection. Process substitution is supported on systems that support named pipes (<small>FIFO</small>s) or the <samp>/dev/fd</samp> method of naming open files. </p> <p>When available, process substitution is performed simultaneously with parameter and variable expansion, command substitution, and arithmetic expansion. </p><div class="_attribution">
<p class="_attribution-p">
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.<br>Licensed under the GNU Free Documentation License.<br>
<a href="https://www.gnu.org/software/bash/manual/html_node/Process-Substitution.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/Process-Substitution.html</a>
</p>
</div>
|