1 2 3 4 5 6 7 8 9
#!/bin/bash for l in `seq 10 99` do echo "=== $l" ./build_and_test_until 0$l # stop after the first index without a file if [ ! -f 0$l* ]; then break; fi done