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

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!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: how to tell if command outputs or not
  5. Summary: how do I do this?
  6. Keywords: if, messages
  7. Message-ID: <1992Nov8.014859.2937@u.washington.edu>
  8. Date: 8 Nov 92 01:48:59 GMT
  9. Article-I.D.: u.1992Nov8.014859.2937
  10. Sender: news@u.washington.edu (USENET News System)
  11. Organization: University of Washington
  12. Lines: 11
  13.  
  14. if messages /usr/spool/mail/$USER
  15. then echo "yes"
  16. else echo "no"
  17. fi
  18. exit 0
  19.  
  20. what I want that to do is if the command messages /usr/spool/mail/$USER
  21. outputs anything then echo yes, but if it doesnt output anything,
  22. then output no...
  23.  
  24. what would the syntax for this be?
  25.