run command in loop code example
Example 1: linux run command in loop
// this is simple for loop with sleep
for i in {1..10}; do echo -n "This is a test in loop $i "; date ; sleep 2; done
Example 2: how run command in loop
// Run command in loop sleep not mandatory done is mandatory
for i in {1..10}; do command; sleep 5; done
example for i in {1..10}; do echo -n "This is a test in loop $i "; sleep 5; done