TABLES=$($MYSQL -u $MUSER -p$MPASS $MDB -e 'show tables' | $AWK '{ print $1}' | $GREP -v '^Tables' )
for t in $TABLES
do
echo "checking $t table from $MDB database..."
$MYSQL -u $MUSER -p$MPASS $MDB -e "check table $t"
done
I found it in Net .. might be useful ..