On 01/07/15 22:48, Stephane Chazelas wrote:
> 2015-07-01 22:19:10 +0300, Ilya Basin:
>> Hi list.
>>
>> Want to read whole stdin into variable.
>> Don't want to spawn new processes (cat).
> [...]
> 
> Note that
> 
> $(<file) does spawn a new process, it's just that bash doesn't
> execute /bin/cat in that process, it does the reading (from
> file) and writing (to the pipe) by itself (and the parent reads
> from the other end of the pipe to make-up the substitution).
> 
> ksh (ksh93 and mksh) and zsh do not spawn a process in the
> $(<file) case.

For completeness dash ignores this format so it's quite non portable


Reply via email to