bash loop n times code example
Example 1: run a command x number of times linux
## run command 10 times
for i in {1..10}; do commandNameHere; done
## run script 20 times
for i in {1..10}; do /path/to/cache.script.sh; done
Example 2: bash while loop n times
for (( i=0; i<10; ++i)); do
[ -e filename ] && break
sleep 10
done