Run console command multiple times

When working with a console, it can happen that you want to run a single command multiple times. I don't want to bother with creating a script for that, but just run it.

Here is a simple way to do so:

for run in {1..10} # 10 = how many times  
do  
  command # command to run
done  

Or as a one-liner:

for run in {1..10}; do command; done  
comments powered by Disqus