screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making screen look for a pattern to detect "activity"


From: Jonathan Martin
Subject: Re: Making screen look for a pattern to detect "activity"
Date: Sat, 20 May 2006 02:52:51 -0400

Maybe a marriage of Expect and Screen is in order  :)



On May 19, 2006, at 7:18 PM, Hari Bhaskaran wrote:


Thanks for the suggestion. However it would have been nice if screen could do this. I would then be able to monitor commands I hadn't anticipated the need for
monitoring when I started the command.

If I were to try to patch such a thing on to screen, where should I start? I can see screen.c 's serv_select_fn() to be one place where I would probably look for the pattern
and then set from p->w_monitor ?

Any pointers/helpful hints are much appreciated.

--
Hari

on 5/19/2006 12:31 PM Joe Zbiciak said the following:
One way might be to pipe the program's output through 'grep.' If you want to see the full output also, you could do something hackish like:

mknod foo p
program | tee foo
screen grep pattern foo

Then set screen's activity monitor on the newly opened screen containing the grep output.

--Joe
 --We sell Spatulas, and that's all!
http://spatula-city.org/~im14u2c/
http://sdk-1600.spatula-city.org/
http://intyos.spatula-city.org/

----- Original Message ----
From: Hari Bhaskaran <address@hidden>
To: address@hidden
Sent: Friday, May 19, 2006 1:13:52 PM
Subject: Making screen look for a pattern to detect "activity"

Hi,

I want to make screen look for a certain configurable pattern in the output to detect "activity" (for the montoring feature Cntrl-a M thingy). I am running a custom program which would print a certain pattern that I want to watch for, not necessarily a strict "silence" or "activity"- which currently means any output.

Is there a way to achieve this in screen? Any help is appreciated





_______________________________________________
screen-users mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/screen-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]