aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/bash.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/bash.md')
-rw-r--r--src/tools/bash.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/bash.md b/src/tools/bash.md
index 9150963..a2b7944 100644
--- a/src/tools/bash.md
+++ b/src/tools/bash.md
@@ -104,6 +104,14 @@ command 2>&1 >file
1. duplicate `fd 1` to `fd 2`, effectively redirecting `stderr` to `stdout`
2. redirect `stdout` to `file`
+## Process substitution ([ref][psub])
+
+Process substitution allows to redirect the stdout of multiple processes at
+once.
+```bash
+vim -d <(grep foo bar) <(grep foo moose)
+```
+
## Argument parsing with `getopts`
The `getopts` builtin uses following global variables:
@@ -227,3 +235,4 @@ complete -F _foo foo
```
[dup2]: http://man7.org/linux/man-pages/man2/dup.2.html
+[psub]: https://tldp.org/LDP/abs/html/process-sub.html