bug-bash
[Top][All Lists]
Advanced

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

Re: help for needs to mention for ((...))


From: Dennis Williamson
Subject: Re: help for needs to mention for ((...))
Date: Sun, 19 Sep 2021 16:19:19 -0500

On Sun, Sep 19, 2021, 4:07 PM Lawrence Velázquez <vq@larryv.me> wrote:

> On Sun, Sep 19, 2021, at 3:25 PM, 積丹尼 Dan Jacobson wrote:
> > $ help for
> > only mentions
> >        for name [ [ in [ word ... ] ] ; ] do list ; done
> > and needs to be updated to mention
> >        for (( expr1 ; expr2 ; expr3 )) ; do list ; done
>
> Not particularly intuitive, but:
>
> bash-5.1$ help 'for (('
> for ((: for (( exp1; exp2; exp3 )); do COMMANDS; done
>     Arithmetic for loop.
>
>     Equivalent to
>         (( EXP1 ))
>         while (( EXP2 )); do
>                 COMMANDS
>                 (( EXP3 ))
>         done
>     EXP1, EXP2, and EXP3 are arithmetic expressions.  If any expression is
>     omitted, it behaves as if it evaluates to 1.
>
>     Exit Status:
>     Returns the status of the last command executed.
>
> --
> vq
>


And

help 'for*'

(No space) gets them both.

>


reply via email to

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