command pipe into subshell command pipe into subshell unix unix

command pipe into subshell


The first notation is the process substitution of Bash 4.x (not in 3.x, or not all versions of 3.x).

As far as tee is concerned, it is given a file name (such as /dev/fd/64) to which it writes as well as to standard output; it is actually a file descriptor for the write end of a pipe. As far as wc is concerned, it reads its standard input (which is the read end of the pipe that is connected to /dev/fd/64 for tee), and writes its answer to the standard output of the shell invoking the pipeline (not the standard output of tee which goes down the pipeline).


Since >( is process substitiution of bash,the first line says:send the contents of file 'dat' into some other commandwhile process 'wc' is run with its input or outputconnected to a pipe which also sends the content of 'dat'

check "Process Substitution" of bash manpage.