home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / send_beer < prev    next >
Text File  |  1990-08-06  |  1KB  |  52 lines

  1. #!/bin/sh
  2. #
  3. # send_beer    - very ordinary beer submission
  4. #
  5. # Create a  beer submission report and mail to `echidna@munnari.oz.au'
  6. # The sender will be placed in `vi' with a copy of the beer submission
  7. # template. When complete, simply exit the editor, and the report will be
  8. # mailed automatically.
  9. #
  10. #
  11.  
  12. ericmail=echidna@munnari.oz.au
  13.  
  14. mailer=/usr/ucb/mail
  15. ed=/usr/ucb/vi
  16. tool=`basename $0`
  17. vobs=/tmp/$tool.$$
  18. vobsb=${vobs}b
  19. trap "rm -f $vobs $vobsb; exit" 0 1 2 3 15
  20.  
  21. sed -e "1,/^#SEND_BEER_FORMAT/d" < $0 > $vobs
  22. cp $vobs $vobsb
  23. $ed $vobs
  24.  
  25. cmp -s $vobs $vobsb
  26.  
  27. if (test $? -eq 0 -o `cat $vobs | wc -c` -le 1) then
  28.     echo "$tool: cancelled"
  29. else
  30.     $mailer $ericmail <$vobs
  31.     echo "$tool: sent"
  32. fi
  33.  
  34. exit 0
  35.  
  36. #SEND_BEER_FORMAT
  37.  
  38. Dear Eric,
  39. I thank you kindly for your free software and hope that you continue
  40. to produce work of this  kind. To support you I am sending you 
  41. <ENTER QUANTITY> cans of <ENTER BRAND>. 
  42.  
  43.  
  44. Best Regards,
  45.  
  46. <ENTER NAME>,
  47. <ENTER COMPANY>,
  48. <ENTER CONTACT>,
  49. <ENTER ADDRESS>,
  50. <ENTER PHONE>
  51.  
  52.