On 3/15/25 9:18 PM, Robert Elz wrote:

POSIX says:

        It is unspecified whether the line containing the trailing delimiter
        is itself subject to this line continuation.

which means that nothing is required to make that work.   Further, unless
bash documents it as working, it is free to change the way it works for
that at any time, so was anyone to take your advice and actually use that
method, then they'd be risking their code breaking in a subsequent release,
with perhaps no warning at all.

The current version of the man page says:

"If the delimiter is not quoted, the \<newline> sequence is treated as a
 line  continuation:  the two lines are joined and the backslash-newline
 is removed.  This happens while reading the here-document,  before  the
 check for the ending delimiter, so joined lines can form the end delim-
 iter."

I added it last September.

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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to