how to code a timer loop in a sh script

JD jd1008 at gmail.com
Mon Nov 6 18:44:47 UTC 2017


Be careful about using numeric values for true.
Please read:

https://www.dartmouth.edu/~rc/classes/ksh/cond-tests.html

Feb 11, 2005 - ... test can be either the test command, or its alias, [ 
, or the /ksh//bash built-in [[ . ... Zero is taken to be "/True/", 
while any non-zero /value/ is "False".

So, it depends on your shell ???



On 11/06/2017 11:24 AM, Michael Schuster wrote:
> Try
>
> while [ 1 ]; do
>      do_stuff
>      sleep 600
> done
>
> Hth
>
> Michael
>
>
> On Nov 6, 2017 19:21, "Ernie Luzar" <luzar722 at gmail.com> wrote:
>
> Trying to write a sh script that will run continually and every 10 minutes
> issue a group of commands. Been trying to use the wait command and the
> while loop command to achieve the desired effect with no joy. Would like an
> example of a wait loop code to see how its done.
>
> Thanks for any help.
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>



More information about the freebsd-questions mailing list