On 11/23/2017 02:23 AM, Chet Ramey wrote:
The bash-4.2 man page defers the description of here strings to the
description of here documents. The lines in a here document do not undergo
word splitting. It was a bug in bash-4.2 that the WORD in a here string
was split.
This finally got fixed in bash-4.4, as described by this CHANGES entry:
z. Bash no longer splits the expansion of here-strings, as the documentation
has always said.
I would think it is useful (and according to how things work in general)
to have a different behavior for <<<"$a" and <<<$a
If one wants to have all line-breaks, spaces and tabs preserved, use
<<<"$a" otherwise use <<<$a
Peter