November 2015
Beginner
282 pages
5h 5m
English
We know that we can use a pipe to provide the output of a command as an input to another command. For example:
$ cat file.txt | less
Here, the cat command output—that is, the content of file.txt—is passed to the less command as an input. We can redirect the output of only one process (cat process in this example) as an input to another process.
We may need to feed the output of multiple processes as an input to another process. In such a case, process substitution is used. Process substitution allows a process to take the input from the output of one or more processes rather than a file.
The syntax of using process substitution is as follows:
To substitute input file(s) by list
<(list)
OR
To substitute output file(s) by list
Read now
Unlock full access