Is there a return code from isql?
Posted in 1992
Judy Miller — — source: Informix-list mailing list archive (1991-1998)
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