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
