Klaas Vantournhout <klaas.vantournh...@gmail.com> writes:
> Recently I came across a surprising undocumented bash-feature
>
>    $ for i in 1 2 3; { echo $i; };
>
> The usage of curly-braces instead of the well-documented do ... done
> construct was a complete surprise to me and even lead me to open the
> following question on stack overflow:

Interesting!  Looking at parse.y, it looks like do ... done can be
replaced with { ... } in 'for' and 'select' statements, but not 'while'
and 'until' statements.  Not clear why that would be, though I haven't
tried extending while/until and recompiling parse.y; maybe it doesn't
work.

Dale

Reply via email to