Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16730
| Path | csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Lawrence Velázquez <vq@larryv.me> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: Undocumented for-loop construct |
| Date | Thu, 6 Aug 2020 22:42:48 -0400 |
| Lines | 25 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.1069.1596768176.2739.bug-bash@gnu.org> (permalink) |
| References | <87364zur1p.fsf@hobgoblin.ariadne.com> <EE275E52-B44A-4033-A7DE-A5D8FAE4A954@larryv.me> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | usenet.stanford.edu 1596768176 29326 209.51.188.17 (7 Aug 2020 02:42:56 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | Klaas Vantournhout <klaas.vantournhout@gmail.com>, bug-bash@gnu.org |
| To | "Dale R. Worley" <worley@alum.mit.edu> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=larryv.me; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=3 i8mNjfKqv/7W/hUhkfrsI1ol/eJmrRJeo2Ce48RZG0=; b=kVN1Vygvu+S5joo3x DydauhkrVSBrFoAHE3wU4YL9w3GnRQCDt/pMut2KRzJqc/8tEVPlc2WHRFfX1xKh VBf1pBQWlkh7AkgJDZymDiqdW/ODJpNBxFMSQdXOJRjmcTryCHZeNXCIgPWHYVtn l4UX2RHZ8l84fojZL7LRUTrawF+VI9Rdz4vouPpKol/jcL26fvbuHLcJLkYVDPbx ASMLhcXW691Q5gBSL+9kUSPwhxWLfDIDLMsG6vSgOfO/HlEw73vQlDD2QGcsEX5+ LXj5haalytWmMvGHspq0kU3XrfXMSkSs8PrQpgPK6j5sFB5j45xPCwu/5vqgQwgS eI3rw== |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=3i8mNjfKqv/7W/hUhkfrsI1ol/eJmrRJeo2Ce48RZ G0=; b=GebCVy0Tm9VM/dtlKiyWZ6UGHkT424Fn6H/4fmdHbovOXqfOXlnAQFTIq mFC9e7GuM0FibDZXFQ00zNNSzympsDZsASU5h/V5UiSEyks3JGBzR1KNB3B5e/Ta rKwtXqZ1+D4ARTvYySr8N54h7nJ2+7C5eoxISPpHqoegN6wY5c2TZgfvvebMjZGP 8J3VrbFIRWUYdlBhE3hOWJJGhBmz22keWu4LysEpIrhgK1ZZou3pAO6q4Rkzmj5T upKPdL/K4ATB7Gb7ooIb8LnfLw/PJ8daQKQZnEJGFvv8JNbkgTJuKzlap2RwKRZP c7ErbhP5WsgPurUQpL/HKJrGkgLOQ== |
| X-ME-Sender | <xms:qb8sX5mGQ0SXeZ7_8uLQ-c6n16AvUizWyWCGvLK4omcT20WUyq1hoQ> |
| X-ME-Proxy-Cause | gggruggvucftvghtrhhoucdtuddrgeduiedrkedugdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefnrgifrhgv nhgtvggpgggvlhojiihquhgviicuoehvqheslhgrrhhrhihvrdhmvgeqnecuggftrfgrth htvghrnhepudffieduvddvgfeghfeikeeffeeuueekleelteeukeeuveeuvdffgedtffdv ieeunecuffhomhgrihhnpehsthgrtghkohhvvghrfhhlohifrdgtohhmnecukfhppedutd dtrdduvddrudejkedrvdefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepvhhqsehlrghrrhihvhdrmhgv |
| X-ME-Proxy | <xmx:qb8sX03hr8brTGS_QibCL8tZ4OVcVZ6HSSv0WKT9RQpep3Fhz1DPRg> <xmx:qb8sX_pzqg1XRZZFys0l-GBvLdpy6Bv2iIhjLX6YmU34aVOfTK0Kyg> <xmx:qb8sX5lpIfH_Tx6jlm0OD2p943SZVfEheHe112Auf74qeF-QHmq2Mg> <xmx:qr8sX8gQgKwyiEv1cdcSsyY2cVrUHzhmWEF8UcU7XtKBrRreaGkU7w> |
| In-Reply-To | <87364zur1p.fsf@hobgoblin.ariadne.com> |
| X-Mailer | Apple Mail (2.3445.104.15) |
| Received-SPF | pass client-ip=66.111.4.26; envelope-from=vq@larryv.me; helo=out2-smtp.messagingengine.com |
| X-detected-operating-system | by eggs.gnu.org: First seen = 2020/08/06 22:42:50 |
| X-ACL-Warn | Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] |
| X-Spam_score_int | -27 |
| X-Spam_score | -2.8 |
| X-Spam_bar | -- |
| X-Spam_report | (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no |
| X-Spam_action | no action |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <EE275E52-B44A-4033-A7DE-A5D8FAE4A954@larryv.me> |
| X-Mailman-Original-References | <87364zur1p.fsf@hobgoblin.ariadne.com> |
| Xref | csiph.com gnu.bash.bug:16730 |
Show key headers only | View raw
> On Aug 6, 2020, at 10:29 PM, Dale R. Worley <worley@alum.mit.edu> wrote:
>
> Klaas Vantournhout <klaas.vantournhout@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
Unless I'm quite mistaken, our very own Oğuz left the only answer
on the OP's Stack Overflow question, explaining that braced forms
of the other compound commands would be syntactically ambiguous.
https://stackoverflow.com/a/63261064
vq
Back to gnu.bash.bug | Previous | Next | Find similar
Re: Undocumented for-loop construct Lawrence Velázquez <vq@larryv.me> - 2020-08-06 22:42 -0400
csiph-web