On Wed, Oct 21, 2020 at 04:48:39PM +0200, r...@beelaertsict.nl wrote:
> #!/bin/bash
> # test error in while clause
> #
> set -x
> up () {
>     i=$(($i+1))
>     [ $i -eq 5 ] && j=$(($j+1)) && i=0
> }

> while [ $i -ne 4 -o $j -ne 2 ]
> do
>     if [ $i -eq 3 ]
>     then
>       up && continue

If $i is 3, you call up.  up increments i, so $i is now 4.  Then it
runs [ $i -eq 5 ] which is false, so the function returns false.

Therefore, continue is never executed here.

Reply via email to