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

Feedback

Powered by Vanilla PHP feedback form