The-Unix-Shell-Teaching-Notes

5.1 Write your own loop

How would you write a loop that echoes all 10 numbers from 0 to 9?

Solution
$ for loop_variable in 0 1 2 3 4 5 6 7 8 9
> do
>     echo $loop_variable
> done
  
0
1
2
3
4
5
6
7
8
9

Episode 5 Exercise 2