On 12/6/16 7:56 PM, Daniel Einspanjer wrote:

> Bash Version: 4.4
> Patch Level: 5
> Release Status: release
> 
> Description:
>     Tested on OSX as well as Ubuntu GNU/Linux 14.4 and Debian Jessie 8
>     Tested with Bash 4.3 and 4.4
> 
>     When trying to output a string from a variable expansion that is inside
> a here doc, the quotes don't behave the same as when not in a here doc.

Here-document lines are processed differently: they are expanded as if
within double quotes, though double quotes in the expanded lines are not
treated specially.  This leads to the situation where the backslashes
preceding double quotes are preserved.  There is variance in shell
behavior in this area: bash, dash, the FreeBSD sh, mksh, and ksh93 all
expand the lines somewhat differently.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to