Re: using xbiff on remote mail

2003-12-18 Thread Brian Ford
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


using xbiff on remote mail

2003-12-16 Thread Lester Ingber
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