Let's say we have "for loop" as follow:
#!/bin/bash
for i in $(cat test_file); do
echo $i
done
The content of text file is names of folders in a parent folder
If the text_file contains 10000 entries (i.e. variable i), how can I tell "for loop" to sleep 10 seconds between every 10 "echos". In other words when for loop reads the variable i in the text_file how can I control the number of variables that for loop can run every specific period of time? So the output as follow:
Variable #1
Variable #2
Variable #3
.
.
.
.
sleep 10
Variable #11
Variable #12
Variable #13
.
. .
for i in 1 2 3; do stuff; donewaits forstuffto complete on each iteration so not sure how they would "work at the same time"... oh well...