Range

Range generates a range of integer number, for example:

$ range 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
$ range 7 ... 12
7 8 9 10 11 12
$ range -8 ... 2
-8 -7 -6 -5 -4 -3 -2 -1 0 1 2

The interest of such a tool is when it is used in a shell script. It allows, for example, to do more powerfull loop. Example in bash:

$ for i in $(range 1 ... 10)
do
   echo i is $i
done

Will produce:

i is 1
i is 2
i is 3
i is 4
i is 5
i is 6
i is 7
i is 8
i is 9
i is 10

Note: Some advanced shells (like bash) provide an equivalent thing:

$ for ((i = 1; i <= 10; ++i))
do
   echo i is $i
done



Installation