Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Nov 2017 11:44:45 -0700
From:      JD <jd1008@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: how to code a timer loop in a sh script
Message-ID:  <5A00AD9D.1090708@gmail.com>
In-Reply-To: <CADqw_g%2BouzDLBdPosKiPSmRZuP6Am%2Bc7OGUZPGWX249D97DUhQ@mail.gmail.com>
References:  <5A00A826.2000501@gmail.com> <CADqw_g%2BouzDLBdPosKiPSmRZuP6Am%2Bc7OGUZPGWX249D97DUhQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5A00AD9D.1090708>