On 12/7/16 7:31 AM, andreas.l...@innovative-navigation.de wrote:

> Bash Version: 4.4
> Patch Level: 0
> Release Status: release
> 
> Description:
> 
> Bash removes double quotes (but not single quotes) when doing variable
> expansion with ${parameter:+word} (Use Alternate Value), in a here-document.

Yes.  All modern shells (bash, ksh93, ksh88, dash, mksh, zsh) with the
exception of the FreeBSD sh (and presumably the NetBSD/OpenBSD sh), do
the same thing.  It's because the here document body is processed as if
it were within double quotes, but double quotes in the lines are not
treated specially.  It's not the most consistent part of expansion, but
there is consistency across shells.

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