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.


Regards
Harri

Reply via email to