Linux – bash + print line every 10 min in bash

bashlinuxperlshell-scripting

I want to print by echo the following "still in process wait another 10 min" every 10 min

Please advice what condition needs to add before the echo command in order to print this line every 10 min?

Remark – counter increase by one every cycle (1 second) , I not want to add Additional delay ( sleep command ) to this script !!!!!

 Until   [    ]
 do
 Counter=1

 sleep 1

  let counter=$counter+1

  [ .... ] &&  echo " still in process wait another 10 min …."

 done 

Best Answer

Add another counter, and if that reaches 600, call echo and reset the counter. Repeat as needed.

So something like this should do:

let echocounter=$echocounter+1
if [ $echocounter == 600 ]; then echo "still in process wait 10 min ..."; $echocounter=0; fi