4 ms·
The <(foo | bar) syntax evaluates to a file path, e.g. $ echo <(echo hi) /dev/fd/63 If a program reads from that file path, it gets the output of the comm
by sillysaurusx 7y ago
The <(foo | bar) syntax evaluates to a file path, e.g.
$ echo <(echo hi)
/dev/fd/63
If a program reads from that file path, it gets the output of the command chain.
$ cat <( (echo foo; echo bar) | grep bar )
bar
Of course, that's a silly example. But that explains how the diff example works, since it's the same idea: diff just reads from the two "files".
EDIT: Heh, 5 different replies within the same 60 second window.