Try to use the 'set -e' command.
Extract from man page :
Quote:
-e If a command has a non-zero exit status, execute the ERR
trap, if set, and exit. This mode is disabled while reading profiles.
|
Code:
set -e
export id=root
export db=testcsv
export db_add=localhost
mysql -h$db_add -u$id -D$db <loadA.sql
Jean-Pierre.