On 1/18/24 9:16 AM, Dastan Abdygali wrote:
Bash Version: 5.2
Patch Level: 0
Release Status: release
Description:
If unclosed single quotes or unclosed double quotes are used as a
delimiter in here-doc, bash lets the user finish the quote on
the next lines. As a result delimiter contains \newline character.
Which even if pasted does not trigger the
here-doc to be concluded.
A here-document delimiter containing a newline can never work: the
delimiter has to appear on a line by itself, immediately followed by a
newline, to be recognized. Some of the ash-based shells accept delimiters
with embedded newlines, but bash never has.
I've considered adding a warning for this or making it a fatal syntax
error like yash, but never done it.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature