bug-bash
[Top][All Lists]
Advanced

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

Re[2]: substitution "read all from fd" silently fails: $(<&0)


From: Ilya Basin
Subject: Re[2]: substitution "read all from fd" silently fails: $(<&0)
Date: Thu, 2 Jul 2015 01:12:54 +0300

SC> 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).
SC> [...]

SC> Note that

SC> $(<file) does spawn a new process, it's just that bash doesn't
SC> execute /bin/cat in that process, it does the reading (from
SC> file) and writing (to the pipe) by itself (and the parent reads
SC> from the other end of the pipe to make-up the substitution).

Very informative, thanks.


-- 




reply via email to

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