Re: Bug: please document extended and alternate for loop syntax
From:
Phi Debian
Subject:
Re: Bug: please document extended and alternate for loop syntax
Date:
Mon, 10 Mar 2025 17:59:15 +0100
On Mon, Mar 10, 2025 at 5:39 PM Zachary Santer <zsanter@gmail.com> wrote:
>
> Another alternative would be for bash to print a warning whenever it
> encounters this syntax.
>
Don't do that, the one who don't care about shell portability. i.e the
script started with #!/bin/bash may well be using this construct "for ((
i=0; i<3; ++i )) { echo $i; }" since ages and don't want to see warnings
all of the sudden. If you go with new warnings path, then it got to be with
a new shopt kind of optin that old script don't use.