4 ms·
>I don't know if the fd is wired directly to the command's stdout or whether the output is written in its entirety to a hidden tempfile first; the former sounds
by tzahola 9y ago
>I don't know if the fd is wired directly to the command's stdout or whether the output is written in its entirety to a hidden tempfile first; the former sounds more natural and efficient.
Nope. <() and >() is equivalent to creating a named pipe with mkfifo and writing to it:
tmp_pipe_dir="$(mktemp -d)"
mkfifo "$tmp_pipe_dir/pipe"
make-input >"$tmp_pipe_dir/pipe" &
process-stuff --file "$tmp_pipe_dir/pipe"
That's the whole point of it, so that the data can be consumed in parallel with the producer.
- lobster_johnson 9y agoRight, that's what I meant. The command is run in a child process with its stdout writing to the pipe. The script gets the read end.