home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / shell / 5475 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  1.1 KB

  1. Path: sparky!uunet!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
  2. From: davidsen@ariel.crd.GE.COM (william E Davidsen)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: Exit status in /bin/sh
  5. Message-ID: <1993Jan22.231926.28938@crd.ge.com>
  6. Date: 22 Jan 93 23:19:26 GMT
  7. References: <1993Jan22.152122.18637@news.csuohio.edu>
  8. Sender: usenet@crd.ge.com (Required for NNTP)
  9. Reply-To: davidsen@crd.ge.com (bill davidsen)
  10. Organization: GE Corporate R&D Center, Schenectady NY
  11. Lines: 21
  12. Nntp-Posting-Host: ariel.crd.ge.com
  13.  
  14. In article <1993Jan22.152122.18637@news.csuohio.edu>, damin@randell.cba.csuohio.edu (Greg Boehnlein) writes:
  15. |     Hello all. I am working with /bin/sh under Ultrix 4.3 and am trying
  16. | to write some scripts that check for exit conditions from Oman technologies
  17. | Z-modem protocols.
  18. | 1. I need to check to see if the transfer was successful.
  19. | 2. Depending on the value of the exit status, I need to do various
  20. |    things.
  21.  
  22.  
  23.   do_it
  24.   case $? in
  25.   0) echo Ok;;
  26.   1) echo "Bad 1";;
  27.   2) echo "Bad 2";;
  28.   *) echo "Unexp. bad stat: $?";;
  29.   esac
  30.  
  31. -- 
  32. bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
  33.     Keyboard controller has been disabled, press F1 to continue.
  34.