27.08.2015 Views

Advanced Bash−Scripting Guide

Advanced Bash-Scripting Guide - Nicku.org

Advanced Bash-Scripting Guide - Nicku.org

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 22. Process Substitution<br />

Process substitution is the counterpart to command substitution. Command substitution sets a<br />

variable to the result of a command, as in dir_contents=`ls −al` or xref=$( grep word datafile). Process<br />

substitution feeds the output of a process to another process (in other words, it sends the results of a command<br />

to another command).<br />

Command substitution template<br />

command within parentheses<br />

>(command)<br />

(true)<br />

/dev/fd/63<br />

bash$ echo

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!