It is my understanding that in awk a conditional evaluation could be started using either of the following:
if ($0 ~ /no/) {cmd}
($0 ~ /no/) {cmd}
$0 ~ /no/ {cmd}
/no/ {cmd}
In the generic command line
BEGIN { } (body) END { }
I find it most logical to enclose (body) in brackets, as in {(body} (referred to as "bracketed").
Under GNU awk, Ubuntu 12.04, only the 1st of the 4 options executes if bracketed - at least on my machine (the others produce syntax errors). If i run the line un-bracketed, only the 1st failed, the rest 3 work fine. Could someone carefully explain why that is so?