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

Feedback about page:

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



Table Of Contents