|
From: | Greywolf |
Subject: | Re: select syntax violates the POLA |
Date: | Mon, 5 Apr 2021 01:56:33 -0700 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 |
On 4/4/2021 23:13, konsolebox wrote:
On Sat, Apr 3, 2021 at 1:09 AM Robert Elz <kre@munnari.oz.au> wrote:| [[ ]] and (( )) are a form of reserved words themselves Those are bash specials, and I am fairly sure that (( and )) will be operators, not reserved words (they cannot really be the latter, as ( and ) are operators) and I suspect that [[ and ]] might be as well, but there I'm not sure. operators and reserved words are quite different things. Operators (unquoted) are recognised as themselves wherever they appear.Stop suspecting and read the source code. Look at parse.y starting at line 2150. They are labeled as "Reserved words".
[[ and ]] behave like reserved words requiring whitespace between themselves and their operands. (( and )) do not carry that restriction; within (( )), neither do any of */%^&|+- (or their respective OP=), nor == || && !. This effectively classifies (( )) as operators. But we've drifted considerably afield. --*greywolf;
[Prev in Thread] | Current Thread | [Next in Thread] |