Janis Papanagnou <
janis_pa...@hotmail.com> wrote:
>On 19.12.2014 17:48, Kenny McCormack wrote:
>> Observe:
>>
>> $ gawk '$2 == $3 == $4'
>> gawk: $2 == $3 == $4
>> gawk: ^ syntax error
>> $
>>
>> This works if you put parens around either sub-expression [*].
>>
>> Note that this works as written (with the appropriate mods to satisfy the
>> compiler) in C [*]. Shouldn't gawk have pretty much the same rules as C?
>
>Well, not necessarily as in C. But anyway, the POSIX Awk syntax says
>
>non_unary_expr : ...
> | non_unary_expr EQ expr
> ...
>
>So, AFAICT, your above expression should be covered by the POSIX awk syntax
>and not be a syntax error.
Interesting. Thanks for researching this for me.