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