Bash loop for monitoring applications

I am trying out exec $0 as an alternative to the while true loop. I am not sure if it’s really a good idea, but the advantage of being able to edit the script while it’s running and see the changes is very appealing to me. If the script doesn’t need variables for the next loop and it doesn’t run often (<1/minute) I think it may be a good idea.

This entry was posted in Programming. Bookmark the permalink.

One Response to Bash loop for monitoring applications

  1. procyon says:

    An alternative is source $0. It has the advantage of variables surviving.

Comments are closed.