Doing one thing multiple times

Hi,

I wrote a awk line here:

awk 'BEGIN {OFS="\t"} {print $0, int(rand()*($2-$1 + 1) + $1) }' filename

Basically what it does is that it takes the start (column 1) and stop (column 2) and generates a random # in between start and stop.

I want to take this a step further and have it generate 100 random numbers at once. How would i do that? is it called looping?

looping - this is a for loop

awk 'BEGIN {OFS="\t"} {for(i=0; i< 100; i++){print $0, int(rand()*($2-$1 + 1) + $1) }}' filename

Something like:

awk '{while(loop--){print $0, int(rand()*($2-$1 + 1) + $1)}}' loop=100 OFS="\t" filename