home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / question / 13830 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  1.0 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!gatech!news.ans.net!cmcl2!adm!news
  2. From: partl@hp01.boku.ac.at (Hubert Partl)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: test for mail
  5. Message-ID: <34221@adm.brl.mil>
  6. Date: 23 Nov 92 08:49:57 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 26
  9.  
  10. Reply to
  11. > From: Anibal Jodorcovsky <anibal@ee470.ee.mcgill.ca>
  12. > Subject: checking for mail from shell
  13. > Date: 14 Sep 92 13:41:58 GMT
  14. > I am trying to check from .login if I have mail.
  15. > BUT, it's not just mail what I want to do, since
  16. > I want to specify an if...then sort of thing
  17. > IN CASE I have mail.
  18.  
  19. in .login (C-Shell):
  20.      mail -e
  21.      if ( $STATUS ) then
  22.      ...
  23.      endif
  24.  
  25. in .profile (Bourne-Shell):
  26.      if mail -e
  27.      then ...
  28.      fi
  29.  
  30. ---
  31. Dr. Hubert Partl                              Mail:  partl@mail.boku.ac.at
  32. EDV-Zentrum, Universitaet fuer Bodenkultur    Phone: (+43 1) 36 92 924 - 233
  33. Nussdorfer Laende 11                          Fax:   (+43 1) 36 92 924 - 200
  34. A-1190 Wien, Austria                          (-:  Make laugh, not war!  :-)
  35.