On Wed, Dec 11, 2013 at 12:36 PM, Manolo Martínez
<manolo_AT_austrohungaro.com> wrote:
> 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).
My problem with fish is that it's not just "there" on any machine.
But, nonetheless, assuming xmessage 'Connected' happens on *my*
machine, *when* the freshly opened ssh connection (as opposed to when
the ssh connection terminates), yeah--that's what I'm going for.
> 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
>> >
>>
>
> --
>
--
http://apgwoz.com
Received on Wed Dec 11 2013 - 18:40:12 CET