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