bug-bash
[Top][All Lists]
Advanced

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

Re: manpage is incorrect re << heredocs and \<newline>


From: Chet Ramey
Subject: Re: manpage is incorrect re << heredocs and \<newline>
Date: Wed, 6 May 2026 16:12:57 -0400
User-agent: Mozilla Thunderbird

On 5/6/26 6:12 AM, Denys Vlasenko wrote:

          If word is unquoted, the delimiter is word itself, and the
here-document  text is treated similarly to a double-quoted string:
all lines of the here-document are subjected  to  parameter  expan‐
sion, command substitution, and arithmetic expansion, the character
sequence \<newline> is treated literally
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is false. Backslash-newline is treated literally only in
<<"EOF" heredocs. In <<EOF heredocs, it is removed
(it's a line continuation).

Thanks. I think this was a sloppy paste job back in September, 2024, when
I made some edits.


Here the description is correct. Not sure why the explanation
how backslash-newline behaves is repeated twice.

Probably because someone asked for it to be called out and clarified.

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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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