process substitution

The bash form <(command), which runs a command and hands its output to another program as if it were a file name.

In more detail

It suits tools that insist on file names, such as diff and comm, as in diff <(sort a) <(sort b). Nothing is written to disk and nothing needs cleaning up, but the file can only be read once from start to end. Feeding a loop with done < <(command) keeps the loop in the current shell, unlike a pipe.

Example

comm -13 <(printf '200\n404\n') <(cut -d' ' -f4 access.log | sort -u)

Related terms

Taught in

References