[Top][All Lists]

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

Re: unbalanced parenthesis not recognized

From: Harald Dunkel
Subject: Re: unbalanced parenthesis not recognized
Date: Mon, 22 Nov 2021 09:03:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2

Hi Chet,

On 2021-11-19 16:27:34, Chet Ramey wrote:
On 11/19/21 2:02 AM, Harald Dunkel wrote:

"Some scenarios" is the point here. The parenthesis have to balance as
soon as it comes to shell parameter expansion, which is (or should have
been) the case here.

OK. Let's look at the original example:

: ${SSLDIR}:="${JM_WORK}/ssl"}

Where do you think parameter expansion applies here, as far as the final
`}' in the string, and why should it "have been the case?" There are no
incomplete parameter expansions in this command; why should the shell
assume that a close brace appearing by itself should be matched somewhere?

I'm not saying that this shell construct is reasonable. The "should have
been" refers to the construct not working as I had intended, due to the
typo. Please excuse my bad English.

Surely I can just speak for myself, but to me it appears obvious that
there is something weird and that there is one closing bracket too much
in this line. I understand that bash doesn't produce an error about the
entire line, because it is valid bash code.


reply via email to

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