Re: manpage is incorrect re << heredocs and \<newline>
Chet Ramey <[email protected]> Wed, 6 May 2026 16:12:57 -0400
| Newsgroups | gmane.comp.shells.bash.bugs |
|---|---|
| Organization | ITS, Case Western Reserve University |
| Message-ID | <[email protected]> |
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 [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
(application/pgp-signature, 203 B)
-----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCafugyQUDAAAAAAAKCRC7WGnwZOp0q/Oo AJ0ffFHp7h96zq9eDSFMCqlYJunjVQCeNhlXHS5pIRLNfrCtkQu5Vwx1slQ= =LUFw -----END PGP SIGNATURE-----