Re: [dev] New utility "when"

From: Andrew Gwozdziewycz <web_AT_apgwoz.com>
Date: Wed, 11 Dec 2013 12:21:25 -0500

On Wed, Dec 11, 2013 at 12:15 PM, Nicholas Hall <ngharo_AT_gmail.com> wrote:
> On Wed, Dec 11, 2013 at 10:31 AM, Andrew Gwozdziewycz <web_AT_apgwoz.com> wrote:
>> I wondered if I could do it in shell, but figured it might be too
>> tricky to do concisely
>
> $ while ! command; do continue; done; xmessage 'returned truthy'
>

Yes. You can do exactly that. But you *can't* do:

    when -t "ssh user_AT_host" "xmessage 'Connected'"

which is the real reason I wrote this. With -t, xmessage 'Connected'
will be run when you get a prompt, e.g. the command didn't "time out"
/ die before 5 seconds (-n <seconds> to change that).

-- 
http://apgwoz.com
Received on Wed Dec 11 2013 - 18:21:25 CET

This archive was generated by hypermail 2.3.0 : Wed Dec 11 2013 - 18:24:17 CET