There are two styles of syntax of for-loop:for (( expr1 ; expr2 ; expr3 )) ; do commands ; donefor name [ [in [words ...] ] ; ] do commands; doneAt a glance, the kinds of looping that two can express seem unrelated to each other. the first one can express looping based on arithmetic expressions, while the second can express looping based on enumerating members in a set words. Essentially, do they actually differ in what kinds of looping they can express, or are they equivalent to each other?If the former, when to use which?
Do the two styles of for-loops differ in what they can express?
bash