bug-bash
[Top][All Lists]
Advanced

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

Re: [in WORDS ... ;] === should be ===> [in WORDS ... ];


From: Paul Jarc
Subject: Re: [in WORDS ... ;] === should be ===> [in WORDS ... ];
Date: Fri, 15 Oct 2004 10:14:09 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

Abraham Alawi <aalawi@gmail.com> wrote:
> [in WORDS ... ;]  === should be ===> [in WORDS ... ];
>
> as the semicolon in this case is compulsary not optional to be
> included between the brackets.

Actually, it is optional when "in WORDS" is absent (at least for bash,
although portable scripts shouldn't rely on it):
$ set 1 2; for i do echo "$i"; done; for i; do echo "$i";done
1
2
1
2

So it should really be: for NAME [[in WORDS ...] ;] do COMMANDS; done


paul




reply via email to

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