|
From: | Slink3r |
Subject: | Re: [monitoring-like] would like to be warned when I have mail (fetchmail -c) |
Date: | Tue, 27 Sep 2005 21:26:21 -0400 |
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
address@hidden
http://lists.gnu.org/mailman/listinfo/screen-users
[Prev in Thread] | Current Thread | [Next in Thread] |