bash loop 100 times code example Example: bash while loop n times for (( i=0; i<10; ++i)); do [ -e filename ] && break sleep 10 done