<(cmd)
is a process substitution. It shares a character with -- but is entirely unrelated to -- the <
used for redirection:
<(cmd)
expands to a filename that you can open and read to get the program's output. You can pass as many filenames as you want to a command.
< filename
opens a filename as file descriptor 0. Opening a new file on the same file descriptor overwrites and closes the previous one.
Your process substitution example simply passes two separate filenames:
$ echo join -1 2 -2 1 <(sort -k 2 wine.txt) <(sort reviews.txt)
join -1 2 -2 1 /dev/fd/63 /dev/fd/6
If you similarly pass two filenames to cat
, you get the same kind of result:
$ cat file1 file2
Hello
World
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…