Skip to content

Commit 6818479

Browse files
authored
Add process subsititution
1 parent 1eda57d commit 6818479

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2631,6 +2631,17 @@ A short way of using if/else. An example:
26312631
[[ $a = 1 ]] && b="yes, equal" || b="nope"
26322632
</b></details>
26332633

2634+
<details>
2635+
<summary>What does the following code do and when would you use it?
2636+
2637+
<code>diff <(ls /tmp) <(ls /var/tmp)</code>
2638+
2639+
</summary><br>
2640+
It is called 'process substitution'. It provides a way to pass the output of a command to another command when using a pipe <code>|</code> is not possible. It can be used when a command does not support <code>STDIN</code> or you need the output of multiple commands.
2641+
https://superuser.com/a/1060002/167769
2642+
</details>
2643+
2644+
26342645
## SQL
26352646

26362647
<a name="sql-beginner"></a>

0 commit comments

Comments
 (0)