Re: [dev] New utility "when"

From: Manolo Martínez <manolo_AT_austrohungaro.com>
Date: Wed, 11 Dec 2013 18:36:24 +0100

fish has

$ ssh user_AT_host; and xmessage 'Connected'; or xmessage 'Problems!'

Is this what you try to do with "when", or am I missing something? (Apart
from the fact that many of you consider that fish sucks).

Manolo

On 12/11/13 at 07:32pm, Dimitris Zervas wrote:
> _AT_nicholas: Sorry, I didn't see your email!
> _AT_Andrew:oh, that's nice!
>
> On Wed, Dec 11, 2013 at 7:21 PM, Andrew Gwozdziewycz <web_AT_apgwoz.com> wrote:
> > 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:36:24 CET

This archive was generated by hypermail 2.3.0 : Wed Dec 11 2013 - 18:48:06 CET