home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.informix
- Path: sparky!uunet!sybus.sybus.com!myrddin!tct!jtt
- From: jtt@tct.com (John Tombs)
- Subject: Re: Is there a return code from isql?
- Message-ID: <2A7034E3.8863@tct.com>
- Date: Fri, 24 Jul 1992 16:50:43 GMT
- References: <1992Jul23.170418.16866@col.hp.com>
- Organization: TC Telemanagement, Clearwater, FL
- Lines: 26
-
- In article <1992Jul23.170418.16866@col.hp.com> judym@col.hp.com (Judy Miller) writes:
- >If I execute isql from a script, how can I test if it bombed?
- >
- >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
- >--------------------------
-
- We redirect standard error to a temporary file, then grep it for error
- messages (all from within the script, of course). Clumsy, but it works.
-
-
- --
- John Tombs at Teltronics/TCT <jtt@tct.com>, <uunet!myrddin!tct!jtt>
- Real Modem Users Do It Internally.
-