run a command x number of times linux

C++
## 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
Source

Also in C++: