home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3066 / xkal-mail < prev    next >
Encoding:
Text File  |  1991-03-15  |  512 b   |  29 lines

  1. #!/bin/sh 
  2. #
  3. #    xkal-mail : Mails today's reminders if there are any that
  4. #        are above criticality level 0.
  5. #
  6. #    George Ferguson, ferguson@cs.rochester.edu, 19 Feb 1991.
  7. #
  8.  
  9. xkal=xkal
  10. mailer=Mail
  11. tmp=/tmp/xkal-mail$$
  12.  
  13.  
  14. case $# in
  15.     0) rec=${USER:?};;
  16.     1) rec=$1;;
  17.     *) echo 'usage: xkal-mail [recipient]' 1>&2; exit 1
  18. esac
  19.  
  20. trap "rm -f $tmp; exit 1" 1 2 3 15
  21.  
  22. if $xkal -listOnly -exitUsesLevels -date +1d >$tmp
  23. then
  24.     :
  25. else
  26.     $mailer -s "Reminders from xkal for `head -1 $tmp`" $rec <$tmp
  27. fi
  28. rm -f $tmp
  29.