public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* using xbiff on remote mail
@ 2003-12-17  6:42 Lester Ingber
  2003-12-19  3:15 ` Brian Ford
  0 siblings, 1 reply; 2+ messages in thread
From: Lester Ingber @ 2003-12-17  6:42 UTC (permalink / raw)
  To: cygwin-xfree

I've been trying to use xbiff to monitor a remote mailbox as in `man xbiff`:
      checkCommand (class CheckCommand)
               Specifies  a shell command to be executed to check for new mail
               rather than examining the size of file.  The  specified  string
               value  is  used  as  the  argument  to a system(3) call and may
               therefore contain i/o redirection.  An exit status of  0  indi-
               cates that new mail is waiting, 1 indicates that there has been
               no change in size, and 2  indicates  that  the  mail  has  been
               cleared.  By default, no shell command is provided.

I set up a command line for xbiff in a command file:
    ----------8<---------- top cut 1/2 -> bottom 1/2 ----------->8----------
#!/bin/tcsh
run xbiff -xrm 'checkCommand "/home/ingber/local/bin/mbsize"' -update 15 -fg red -geometry 75x75+0+75
    ----------8<---------- bottom cut 1/2 <- top 1/2 ----------->8----------
I've tried some different variations of single and double-quotes in
this command.

I've tested the `mbsize` command file and it does what is expected by
checkCommand().
    ----------8<---------- top cut 2/2 -> bottom 2/2 ----------->8----------
#!/bin/tcsh -f
set HEADER = 13
set MB = `ssh -q -x XXX.com -n /home/ingber/local/bin//mbsize`
if ( $MB <= $HEADER) then
  /bin/rm -f /home/ingber/.Lester_mailbox
  echo 2
else
if (-e /home/ingber/.Lester_mailbox) then
  set MBHOME = `cat /home/ingber/.Lester_mailbox`
  if ($MB > $MBHOME) then
    /bin/rm -f /home/ingber/.Lester_mailbox
    echo $MB > /home/ingber/.Lester_mailbox
    echo 0
  else
    echo 1
  endif
else
  echo $MB > /home/ingber/.Lester_mailbox
  echo 0
endif
endif
    ----------8<---------- bottom cut 2/2 <- top 2/2 ----------->8----------

When I run xbiff, the mailbox window pops up OK, but it not running
checkCommand() as far as I can tell?

Thanks.

Lester




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: using xbiff on remote mail
  2003-12-17  6:42 using xbiff on remote mail Lester Ingber
@ 2003-12-19  3:15 ` Brian Ford
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Ford @ 2003-12-19  3:15 UTC (permalink / raw)
  To: cygwin-xfree, Lester Ingber

On Tue, 16 Dec 2003, Lester Ingber wrote:

> I've been trying to use xbiff to monitor a remote mailbox as in `man xbiff`:
>       checkCommand (class CheckCommand)
[snip]
>                therefore contain i/o redirection.  An exit status of  0  indi-
>                cates that new mail is waiting, 1 indicates that there has been
>                no change in size, and 2  indicates  that  the  mail  has  been
>                cleared.  By default, no shell command is provided.
>
Notice it says exit status.
[snip]
>     ----------8<---------- top cut 2/2 -> bottom 2/2 ----------->8----------
> #!/bin/tcsh -f
> set HEADER = 13
> set MB = `ssh -q -x XXX.com -n /home/ingber/local/bin//mbsize`
> if ( $MB <= $HEADER) then
>   /bin/rm -f /home/ingber/.Lester_mailbox
>   echo 2
exit 2?

> else
> if (-e /home/ingber/.Lester_mailbox) then
>   set MBHOME = `cat /home/ingber/.Lester_mailbox`
>   if ($MB > $MBHOME) then
>     /bin/rm -f /home/ingber/.Lester_mailbox
>     echo $MB > /home/ingber/.Lester_mailbox
>     echo 0
exit 0?

>   else
>     echo 1
exit 1?

>   endif
> else
>   echo $MB > /home/ingber/.Lester_mailbox
>   echo 0
exit 0?

> endif
> endif
>     ----------8<---------- bottom cut 2/2 <- top 2/2 ----------->8----------
>

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-12-18 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-17  6:42 using xbiff on remote mail Lester Ingber
2003-12-19  3:15 ` Brian Ford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).