Re: Design question(s), re: why use of tmp-files or named-pipes(/dev/fd/
From:
Stephane Chazelas
Subject:
Re: Design question(s), re: why use of tmp-files or named-pipes(/dev/fd/N) instead of plain pipes?
Date:
Mon, 19 Oct 2015 11:04:58 +0100
User-agent:
Mutt/1.5.21 (2010-09-15)
2015-10-18 19:36:49 -0400, Chet Ramey:
> On 10/17/15 8:43 PM, Linda Walsh wrote:
[...]
> > ??? I've never seen a usage where it expands to a filename and
> > is treated as such.
>
> Every example of process substitution ever given expands to a filename,
> and the result is treated as a filename.
[...]
Possibly (though unlikely) the confusion comes from the yash
shell where <(...), >(...) are for process *redirection* instead
of process *substitution*.
In yash.
ls >(process-stdout-cmd) 2>(process-stderr-cmd)
Does run those process-stdout-cmd and process-stderr-cmd
commands in background and ls's stdout and stderr are pipes to
their input.
See
http://unix.stackexchange.com/a/208133http://unix.stackexchange.com/a/86372
for some more details and example usage.
--
Stephane