Bash Process Substitution
Piping the stdout of a command into the stdin of another is a useful technique. like this:

$sort f.lst |uniq -c

What if you need to pipe the stdout of multiple commands? Yes, it's process substitution.

Process substitution feeds the output of a process (or processes) into the stdin of another process.

There are two operations of substitution:

<(command list)
>(command list)

Process substitution uses /dev/fd/<n> files to send the results of the process(es) within parentheses to another process

Bash creates a pipe with two file descriptors, --fIn and fOut--. The stdin of true connects to fOut (dup2(fOut, 0)), then Bash passes a /dev/fd/fIn argument to echo. On systems lacking /dev/fd/<n> files, Bash may use temporary files.
The example shows process substitution uses /dev/fd/<n> files to send the results of the process(es) within
parentheses to another process.
There is no space between the the "<" or ">" and the parentheses. Space there would give an error message.

bash$ echo >(true)
/dev/fd/63
bash$ echo <(true)
/dev/fd/63
bash$ echo >(true) <(true)
/dev/fd/63 /dev/fd/62

So, here are few more examples of using process substitution:

Example1:

A simple example is this

$ wc <(cat /etc/redhat-release)
      1       5      40 /dev/fd/63

This is equivalent to pipe

$ cat /etc/redhat-release  |wc
      1       5      40

Example2:

Process substitution can compare the output of two different commands, or even the output of different options to the same command.

$ comm <(ls -l) <(ls -al)

Or

sort -k 9 <(ls -l /bin) <(ls -l /usr/bin) <(ls -l /usr/X11R6/bin)
# Lists all the files in the 3 main 'bin' directories, and sorts by filename.
# Note that three (count 'em) distinct commands are fed to 'sort'.

Example3:

Process substitution can compare the contents of two directories -- to see which file names are in one, but not
the other.

$diff <(ls $first_directory) <(ls $second_directory)

Example4:

Example below lists all the files in the 3 main 'bin' directories, and sorts by filename

sort -k 9 <(ls -l /bin) <(ls -l /usr/bin) <(ls -l /usr/X11R6/bin)

Note: that three (count 'em) distinct commands are fed to 'sort'.

Example5:

Here is a method of circumventing/avoid the problem of an echo piped to a while-read loop running in a subshell.
Code block redirection without forking

Redirecting the output of process substitution into a loop.

while read des what mask iface; do
# Some commands ...
done < <(route -n)
Note:  First < is redirection, second is process substitution.

What's good about it?

Not like pipe, which forks a subshell to process the stdin message, all variables in the subshell lost after subshell finishs.

route -n | while read x; do ((y++)); done
echo $y
Note: $y is still unset

While compare to this

while read x; do ((y++)); done < <(route -n)
echo $y
Note: $y has the number of lines of output of route -n

Example6:

Here is one more example:

#!/bin/bash
# psub.bash
declare -a array0
while read
do
array0[${#array0[@]}]="$REPLY"
done < <( sed -e 's/bash/CRASH-BANG!/' $0 | grep bin | awk '{print $1}' )
# Sets the default 'read' variable, $REPLY, by process substitution,
#+ then copies it into an array.
echo "${array0[@]}"
exit $?