$ cat file.txt | less
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
To substitute output file(s) by list
list is a command or a pipeline of commands. Process substitution makes a list act like a file, which is done by giving list a name and then substituting that name in the command line.