On Wed, Nov 17, 2021, at 7:35 AM, João Almeida Santos wrote: > I’m a programming student currently on 42 School in Lisbon, and one of > our projects is to create a minishell, and to mimic the behavior of > bash.
Nice! > While testing the heredoc mode, I realized that the $ is not > interpreted as variable expansion. That’s interesting. Are you talking about your project or bash? In the latter (and related shells), expansion is only suppressed in a here-document if, when the delimiter is specified, it is at least partially quoted. $ cat <<EOF + this is bash $BASH_VERSION + EOF this is bash 5.1.8(1)-release $ cat <<\EOF + this is bash $BASH_VERSION + EOF this is bash $BASH_VERSION > But the reason why I’m emailing you is that I whenever I tried to use > an unclosed quote on heredoc, it doesn’t seem to handle well…it never > finishes the heredoc. > I tried \n for paragraph, verbatim inserting enter, closing quotes on > the next line, …don’t know what else to test. This description is a bit hard to follow. Could you provide a small bit of code that demonstrates the issue? -- vq