bug-bash
[Top][All Lists]
Advanced

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

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


From: Greg Wooledge
Subject: Re: substitution "read all from fd" silently fails: $(<&0)
Date: Wed, 1 Jul 2015 17:12:09 -0400
User-agent: Mutt/1.4.2.3i

On Wed, Jul 01, 2015 at 10:19:10PM +0300, Ilya Basin wrote:
> Want to read whole stdin into variable.
> Don't want to spawn new processes (cat).

If the data stream does not contain any NUL bytes, you can use:

IFS= read -r -d '' variable



reply via email to

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