Added improved bash version of repeat script.