[Top][All Lists]

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

Reportting a BUG in Heredoc

From: Abla OUHAGA
Subject: Reportting a BUG in Heredoc
Date: Tue, 25 Oct 2022 19:32:33 +0000

From: abouhaga
To: bug-bash@gnu.org
Subject: Reporting a BUG in Heredoc.

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: darwin18.7.0
Compiler: clang
uname output: Darwin e2r9p9.1337.ma 18.7.0 Darwin Kernel Version 18.7.0: Tue 
Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
Machine Type: x86_64-apple-darwin18.7.0

Bash Version: 5.2
Patch Level: 2
Release Status: release

        While working to make my own shell that reproduces the behavior of bash 
for some cases, I tested my work and compared it to the output of Bash. For 
Heredoc I gave it different delimiters as test cases, then I encountered a Bug 
for the case of ( << "$USER ) as input.

        For the described case above, the heredoc never gets out with any given 
delimiter. I do understand that I should close the double quote first in order 
to get in the heredoc maybe, But I find it ambiguous. I spent hours trying so 
many delimiters but it never gets out of it unless I enter CTRL+D (EOF). I also 
upgraded my BASH to check if it's the same behavior in the latest version, and 
I encounter the same BUG. based on that I did not know how to implement this 
test case in my own shell. Finally, that is my reason for reporting it.
Thank you.

        I guess that the correct behavior is to give a prompt to close the 
double quote, then proceed to close the heredoc with an unquoted delimiter.

PS: It is the case for a single quote too.

reply via email to

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