you can remember the time and compare with the current time in the loop state
echo -n "before: " date t1=$(( $(date +"%s" ) + 15 )) #15 for testing or β¦ your 500s later while [ $(date +"%s") -lt $t1 ] #add other condition with -a inside the [ ] which is shortcut for `test` command, in case you want to use `man` do sleep 3 #do stuff done echo -n "after: " date
vv01f source share