I'm trying to get screen to simply ding me whenever "devil" from irc channel #void speaks
I figured I could use something like tail -n 5 /$HOME/.BitchX/logs/#void.log |grep devil
and just execute that every 3 seconds or something, then if it returns something other than
null, it could beep me.
Is there a simple way to do this?
On 9/27/05, Gerhard Siegesmund <[EMAIL PROTECTED]> wrote:
Hello
I did something similar, but asking an imap-Server for the number of
mails with fetchmail -c. Problem was: The query took several seconds to
succeed, in which time my screen freezed as the hardstatusline was
waiting for the info.
I read the manpage and found "backtick 1 0 0 script" which is supposed
to start the script and just wait for new messages to stdout to output
them on the hardstatusline. Works great! Except for one thing: The
script doesn't get killed, if the screen is ended. This means I have to
stop the mailcheck-scripts which are created from screen by hand.
Is there anything I can do to automatically stop the started scripts if
the parent-screen is terminated?
> This seems to be a good opportunity to make use of the hardstatus
> and backticks. I agree a script is the right idea; here's how I'd do
> it.
> $ cat ~/bin/screen-checkmail
> #!/bin/sh
> fetchmail -c $OTHER_FETCHMAIL_JIGGERY_POKERY
> [parse fetchmail output reasonably]
>
> $ cat ~/.screenrc
> ...
> backtick 1 60 1 /$HOME/bin/screen-checkmail
> ...
> hardstatus alwayslastline ...%1`...
> Adding a conditional wrapper around your mail checker (eg %?...%?)
> will ensure that you only see your mail alert when your checkmail
> script produces output.
--
cu
--== Jerri ==--
Homepage: http://www.jerri.de/ ICQ: 54160208
Public PGP Key: http://www.jerri.de/jerris_public_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDOcNwempWDMy2bscRApVGAJ9po1jpAE3S4ucefhdYwa8Dk7X9rACgwnIn
3DzSp0c4UbABswoCUQT/1oU=
=b1ZT
-----END PGP SIGNATURE-----
_______________________________________________
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users
_______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users