most likely you just need to redirect STDERR to tee as well so it's not
a mysql problem:
mysql -u -p -f << eof 2>&1 | tee ttt.txt
...
assuming it's Bourne or ksh, don't remember what's csh for 2>&1
Regards,
Michael
-----Original Message-----
From: [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Thu, 26 Apr 2007 8:15 AM
Subject: spool data/log into a file.
Hi All,
I have written a script to connect to mysql and all the command results
is
spooled into a file.
But when an error occurs in mysql, it stops at that point and does not
proceed to the next command, also these error command is not written to
the
output file.
Can you please tell me what i need to do, for the script to continue
even if
there is an error and that these errors should be spooled into a file.
I have used -f(force) option while connecting to mysql db, it continues
even
if there is any error in the script, but it does not write error
command
into the output file. Can you please help how can i spool all the
output
into a file.
Below is the simple script i am using, ttt.txt is the file which will
contain the all the output of the script.
mysql -u -p -f << eof | tee ttt.txt
use dev1;
select count(*) from rep_abc;
select count(*) from rep_fact;
exit
eof
________________________________________________________________________
Check Out the new free AIM(R) Mail -- 2 GB of storage and
industry-leading spam and email virus protection.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]