I would like to have a while loop in bash like this:
while read i
do
~/bin/submit_job $i
sleep N
done
But I would like N in sleep N to be short at the beginning, then progressively increase after the first few loops. Something like one second for the first 8, then increase in seconds like this:
1 1 1 1 1 1 1 1 (first 8 iterations)
2 2 2 2 2 2 2 2
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
...
Any ideas?