Any other alternative to at

Peter Silva peter at bsqt.homeip.net
Sun Feb 18 18:58:46 UTC 2018


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.


On Sun, Feb 18, 2018 at 1:50 PM, Ralf Mardorf <silver.bullet at zoho.com> wrote:
> On Sun, 18 Feb 2018 19:42:06 +0100, Ralf Mardorf wrote:
>>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.
>
> Let alone that my loop handles an exit (usually less critcial than a
> start) and you try to handle a start.
>
> Google for audio session scripts and you'll see that "&& sleep $foo" is
> the common way to go, for good reasons.
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




More information about the ubuntu-users mailing list