I am trying to write a code so that a command repeats N(say 10) times every second in bash shell script. I am having problem in making the loop wait for the fraction of second left after sending the 1st 10 commands. I am using while loop to start the loop:
while [ $SECONDS -lt $((SECONDS+$time)) ]; do
for the number of commands I am using a for loop:
for i in $(seq 1 10); do echo 'Hello!'; done