home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.informix
- Path: sparky!uunet!caen!sdd.hp.com!hp-col!judym
- From: judym@col.hp.com (Judy Miller)
- Subject: Is there a return code from isql?
- Sender: news@col.hp.com (Usenet News)
- Message-ID: <1992Jul23.170418.16866@col.hp.com>
- Date: Thu, 23 Jul 1992 17:04:18 GMT
- Organization: HP Colorado Springs Division
- Lines: 25
-
- If I execute isql from a script, how can I test if it bombed?
-
- (I didn't see any discussion in Appendix I, Accessing Programs from the
- Operating System.)
-
- Example:
- --------------------------
- $IFXDIR/isql -s <<-EOF
- database aspdb;
- delete from productdesc;
- typo to make it bomb
- load from "$ORBDIR/orb7050d" insert into productdesc;
- EOF
-
- if [ $? -ne 0 ]; then
- echo $?
- else
- echo "OK"
- fi
- --------------------------
-
- I'd like to test if it failed, but the following doesn't work since $? is 0.
- I assume there must be something else I can test.
-
- Judy
-