home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / shell / 4560 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  787 b 

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!hal.com!olivea!charnel!rat!usc!wupost!emory!ogicse!news.u.washington.edu!carson.u.washington.edu!micah
  2. From: micah@carson.u.washington.edu (Micah Anderson)
  3. Newsgroups: comp.unix.shell
  4. Subject: New mail?
  5. Summary: How to find out if I have new mail?
  6. Keywords: mail, csh
  7. Message-ID: <1992Nov6.063334.16263@u.washington.edu>
  8. Date: 6 Nov 92 06:33:34 GMT
  9. Sender: news@u.washington.edu (USENET News System)
  10. Organization: University of Washington
  11. Lines: 11
  12.  
  13. How can I find out if I have new mail and when I do run my shell script?
  14. I cannot use .filter, so would something like:
  15.  
  16. test -s /usr/spool/mail/$USER
  17. if (status == 0) then
  18. script
  19. endif
  20.  
  21. would this be a good idear? (adding in a sleep and then running it again..)
  22.  
  23. any suggestions?
  24.