summaryrefslogtreecommitdiff
path: root/Process substition (tmp file).md
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-06-02 12:15:47 +0200
committerJasper Ras <jras@hostnet.nl>2025-06-02 12:17:02 +0200
commit9bd8cdf2ecc2b60f873b393122b19985cbc4587c (patch)
treea4e0ad7e2824e24b187525fc3c51f8d382d1aceb /Process substition (tmp file).md
parenta61d928b279c5c508aca3bfc7cb14d810c3d75de (diff)
vault backup: 2025-06-02 12:15:47
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