On Wed, 23 Feb 2005, Nupur Jain wrote:
Hi Nupur,
I am executing a mysql query through shell and expecting to see a return of SQL execution.
mysql -D $dbName --vertical -u $DBUSER -p$DBPASS < $queryFile > $opFile rc=$?
Here rc is always 0 and so are $opFile entries. $queryFile contains exactly the same query as listed below.
the following egrep (or grep -e) should do the trick:
mysql -D $dbName --vertical -u $DBUSER -p$DBPASS < $queryFile > $opFile
egrep -qv "Empty set (0.00 sec)" $opFile
rc=$?
Olivier Kaloudoff CKR Solutions Open Source Mandelieu, France http://www.ckr-solutions.com
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]