[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Undocumented for-loop construct

From: Klaas Vantournhout
Subject: Undocumented for-loop construct
Date: Thu, 6 Aug 2020 23:50:49 +0200

Dear Bash-developers,

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:


The community is unable to find any reference to this feature, except

* a brief slide in some youtube presentation by Stephen Bourne:

    Relevant part starts at 34:55

* and the actual source code of bash and the Bourne Shell V7

1) Is there a reason why this is undocumented?
2) Can this become documented?
3) What is the historical background behind this alternative construct?

Thanks in advance,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]