For Loop
suggest change#! /bin/bash
for i in 1 "test" 3; do #Each space separated statement is assigned to i
echo $i
done
Other commands can generate statements to loop over. See “Using For Loop to Iterate Over Numbers” example.
This outputs:
1
test
3
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents