Count to ten

Published: Wednesday, Dec 26, 2007 Last modified: Wednesday, Oct 2, 2024

Counting:

debian$ sh toten.sh

0

1

2

3

4

5

6

7

8

9

10

debian$ cat toten.sh

LIMIT=10

i=0

while [ $i -le $LIMIT ]

do

echo $i

i=`expr $i + 1`

done

Nice guide: http://pegasus.rutgers.edu/~elflord/unix/bash-tute.html