Some shells, like bash
, support Process Substitution which is a way to present process output as a file, like this:
I am trying to understand named pipes in the context of this particular example.
I tend to use pipelines in my bash scripts over process substitution in most situations, especially in cases of using multiple sets of commands as it seems more readable to do ... | ... | ...
over ... < <(... < <(...))
.
I don’t have much experience of using tee, so I hope this is not very basic.
I was researching the other question, when I realized I don’t understand what’s happening under the hood, what are those /dev/fd/*
files and how come child processes can open them.
I know how to combine the result of different command
The process substitution <(cat)
doesn’t work. Why?
I want my shell scripts to fail whenever a command executed with them fails.
In bash
, I can use Process Substitution and treat output of a process as if it was a file saved on disk: