bug-bash
[Top][All Lists]
Advanced

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

Re: Unclosed quotes on heredoc mode


From: João Almeida Santos
Subject: Re: Unclosed quotes on heredoc mode
Date: Wed, 17 Nov 2021 18:45:05 +0000

No, it’s on the email...Anyway, here’s the text!

bash-5.1$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/:/usr/local/bin/:/usr/local/bin/

bash-5.1$ cat << $PATH
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/:/usr/local/bin/:/usr/local/bin/
> it should have terminated with the upper delimiter! but, bash does not seem 
> to expand PATH.
> $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/:/usr/local/bin/:/usr/local/bin/
it should have terminated with the upper delimiter! but, bash does not seem to 
expand PATH.
bash-5.1$

ok, but now addressing the actual question. If I use unclosed quotes on 
heredoc, I can't use 
the given delimiter to end the heredoc, I end up having to use an EOF. Example:

bash-5.1$
bash-5.1$ cat « ola"
> I,
> ola""
> ola"
> ola
>
bash: warning: here-document at line 31 delimited by end-of-file (wanted 'ola
')
ola""
ola"
ola

In the above example, I don't unterstand how to provide the wanted delimiter! I 
try to close the quote, in case it is needing it, but even with both quotes, 
just one or none, it doesn't close...not even with a '\n' char



Kind regards,
João Almeida Santos

> On 17 Nov 2021, at 18:34, Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
> 
> u forgot to attach the picture .. ?
> 
> On Wed, Nov 17, 2021, 19:31 João Almeida Santos <j-almeidasantos@hotmail.com 
> <mailto:j-almeidasantos@hotmail.com>> wrote:
> Thank you for your reply Robert and Lawrence!
> 
> I understand the description alone is hard to follow, so I think the image 
> below should make it clearer. Otherwise let me know!
> 
> 
> Kind regards,
> João Almeida Santos



reply via email to

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