how to code a timer loop in a sh script
mfv at bway.net
Mon Nov 6 19:15:41 UTC 2017
> On Mon, 2017-11-06 at 12:24 Tim Daneliuk <tundra at tundraware.com>
>On 11/06/2017 12:21 PM, Ernie Luzar 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
>> To unsubscribe, send any mail to
>> "freebsd-questions-unsubscribe at freebsd.org"
>while [ 1 = 1 ]
> sleep 600
It is also possible to use the ":" command as part of the loop. Thus,
In other words replace "[ 1 = 1 ]" with a single colon ":".
According to "man 1 sh":
: A null command that returns a 0 (true) exit value.
More information about the freebsd-questions