[Top][All Lists]

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

Re: [here string] uncompatible change on here string function

From: PePa
Subject: Re: [here string] uncompatible change on here string function
Date: Thu, 23 Nov 2017 08:17:21 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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


reply via email to

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