On 9/26/18 2:17 AM, Dirk Wetter wrote:
>> then what happens if "$data" is
>> a paragraph of text with embedded newlines. In that case,
>> it sounds like bash might break apart the single printf
>> output into smaller packets rather than transmitting the
>> entirety of "$data" in 1 write (presuming it is less than
>> the maximum data size for a network packet).
>
> yup.
>
> Wonder why the coreutils printf behaves (in my sense) better
> than the bash-builtin.
The answer's the same as it was last week: because bash line-buffers
stdout and stderr, which it has done since early 1992.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/