I got my computer today to do work on a bashscript called MF.sh..
wget somefile1
wget somefile2
wget somefile3
Ok. But somefiles familly like to change every minute, so I wrote this amazing piece of code to repeat the work every minute:
sleep 45
./MF.sh
I ended up killing zilllion process in htop manually.
What is the best practice here? What type of loop to use? Where to break? Using “i” like control variable is just a convention? How to use minutes time to control this?
EDIT (expanding question instead of answering it)
I tryed this
h=$(date +%R)
for ($(date +%R) = $h)
then
to catch when minute changes, but failed.
whileloops while its command is true.trueis always true.