For Loop with C-style syntax

suggest change

The basic format of C-style for loop is:

for (( variable assignment; condition; iteration process ))

Notes:

Example:

for (( i = 0; i < 10; i++ ))
do
    echo "The iteration number is $i"
done

Also we can process multiple variables inside C-style for loop:

for (( i = 0, j = 0; i < 10; i++, j = i * i ))
do
    echo "The square of $i is equal to $j"
done

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents