summaryrefslogtreecommitdiff
path: root/Process substition (tmp file).md
diff options
context:
space:
mode:
Diffstat (limited to 'Process substition (tmp file).md')
-rw-r--r--Process substition (tmp file).md15
1 files changed, 15 insertions, 0 deletions
diff --git a/Process substition (tmp file).md b/Process substition (tmp file).md
new file mode 100644
index 0000000..c9103c2
--- /dev/null
+++ b/Process substition (tmp file).md
@@ -0,0 +1,15 @@
+---
+tags:
+ - bash
+ - howto
+---
+[[Bash]] [[Parameter subsitution]] [[Null substitution]]
+
+Process substitution connects the output of a command to a file. This enables another command to accept the output of multiple commands as files if it expects files.
+
+An example of this is `diff`, which outputs the difference between two files:
+```bash
+diff <(ls dirA) <(ls dirB)
+```
+
+> Important! Don't but the <() inside quotes.. it will report: cannot find file \ No newline at end of file