Any other alternative to at
Ralf Mardorf
silver.bullet at zoho.com
Sun Feb 18 19:21:06 UTC 2018
On Sun, 2018-02-18 at 13:58 -0500, Peter Silva wrote:
> The lines above what you are responding to clearly state that this is
> an example that might work in some cases.
> Yes, of course && is better if you can do that, but the assumption was
> that the exit code was not indicative of readiness of the first
> component, as someone else's reply to that letter had indicated. If &&
> doesn't capture the event you need, then you need something else.
> What else you need is application specific, and one example could be a
> message in the log. It was never claimed to be a general solution,
> as no general solution exists.
The general solution, is to use
for_a_while=2 # increase the value if needed
app_A && sleep $for_a_while
app_B
;)
For some purposes there is the need to use a loop, but then it becomes
tricky, to catch a real exit, the PID could be used, but to get the
state, when an app is really ready, it becomes fishy. Indeed, to grep
something from some output could work, but it's not secure to rely on
it.
More information about the ubuntu-users
mailing list