bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "here strings" and tmpfiles


From: Greg Wooledge
Subject: Re: "here strings" and tmpfiles
Date: Wed, 10 Apr 2019 08:38:26 -0400
User-agent: Mutt/1.10.1 (2018-07-13)

On Tue, Apr 09, 2019 at 04:48:30PM -0700, L A Walsh wrote:
>     But the implementation of process substitution in bash
> isn't implemented that way in the currently released version.  It
> uses a tmp file on a disk of fixed size to store *all* of the output
> of the 'writer' before the reader is called.

You're getting confused.

Process substititutions  <(cmd)  >(cmd)   use either a named pipe, or
an entry in /dev/fd/, depending on the platform, as determined at
build time.  The cmd is run as a child process in the background.
The <() or >() syntax is replaced by the filename of the named pipe or
/dev/fd/ entry.

Here documents  <<  and here strings  <<<  use temporary files.  No
new processes are created.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]