[sllug-members]: Command to Execute command continuously

Will Aoki waoki at waoki.org
Wed Jun 21 13:08:08 MDT 2006


On Wed, Jun 21, 2006 at 03:27:08AM -0600, Lamont R. Peterson wrote:
> On Wednesday 21 June 2006 12:27am, Randy Clements wrote:
> > I just realized I could call the script itself at the end of the script.
> > And that seems to be working a bit.  However, is there a better way to do
> > what I want to do??
[snipped]
> Step 2.  At the end of the script, it calls itself, forking another shell like 
> in step 1.  This shell process will not exit until the command just called 
> exits.

Although it's better to just add a loop to the script, it is possible to
have it call itself at the end but to avoid the fork by using the exec
shell builtin, so that the shell replaces itself with whatever you're
exec'ing - in this case, another shell.

-- 
William Aoki         waoki at waoki.org              KD7YAF


More information about the sllug-members mailing list