process pipe operator
<( ) operator executes command inside the parenthesis and output the file descriptor
example
1
$ cat <(echo 'hello') <(echo 'world')
2
hello
3
world
4
​
5
# is practically the same with
6
​
7
$ echo 'hello' > 1.txt
8
$ echo 'world' > 2.txt
9
$ cat 1.txt 2.txt
10
​
11
# replace cat with ls
12
$ ls <(echo 'hello') <(echo 'world')
13
/proc/self/fd/11 /proc/self/fd/12
Copied!
you can use this command for example to compare 2 directory and find only uniq file
example:
1
$ comm -3 <(ls -1 dir1) <(ls -1 dir2)
Copied!
Last modified 1mo ago
Copy link