Bash `loop` statements
We'll cover the following...
for
loop
For loops allow repeated execution of a command sequence based on an iteration variable. Bash supports two kinds of for loop, a “list of values” and a “traditional” c-like method.
for varname in list
do
commands
done
Note that
- Bash
for
,in
,do
and