[Top][All Lists]

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

Document bug of 'for' compound command

From: vanou
Subject: Document bug of 'for' compound command
Date: Sat, 19 Aug 2017 00:22:20 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1


I think, there is document bug related to 'for' compound command in both Man page and Info doc.

In man page, description of 'for' compound command ...

*  for (( expr1 ; expr2 ; expr3 )) ; do list ; done
*     First, the arithmetic expression expr1 is evaluated according
*     to the rules described below under ARITHMETIC EVALUATION.
*     The arithmetic  expression  expr2 is  then evaluated  repeatedly
* until it evaluates to zero. <-- not zero, but 1 * Each time expr2 evaluates to a non-zero value, <-- not non-zero,but 0
*     list is executed and the arithmetic expression expr3 is evaluated.
* If any expression is omitted, it behaves as if it evaluates to 1. <-- not 1, but 0
*     The return value is the exit status of the last command in list
*     that is executed, or false if any of the expressions is invalid.

And same document bug in Info documentation of bash.

This bug is seen at bash 4.4.


reply via email to

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