Any other alternative to at
Ralf Mardorf
silver.bullet at zoho.com
Sun Feb 18 18:42:06 UTC 2018
On Sun, 18 Feb 2018 13:16:02 -0500, Peter Silva wrote:
>while [ ! "`tail -100 /where/the/log/is | grep message`" ]; do
> sleep 1
>done
>start_second_app;
Or you simply replace such nonsense by
sleep 2
;), since it not necessarily is possible to universal find a term you
could grep, but it much often always works, when just adding a delay.
Instead of "2" use a variable, just in case the script should work on
your friends 25 years old machine, too, by simply increasing the
variable for this value.
I already gave an example were such a loop is useful, however, those
loops include "sleep" and while my example isn't tricky, based upon a
PID, you example is tricky, since you assume that there is some constant
term you could grep, by some output you expect.
More information about the ubuntu-users
mailing list