Re: spool log to a file

2008-07-30 Thread walter harms
that is a shell question using bash/ksh stuff you can use this: mysql -uroot -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt 2>&1 Ananda Kumar wrote: > The problem with below statement is that, if i there is any error in sql > statements it does not get written to 1.txt. So, even

Re: spool log to a file

2008-07-30 Thread Ananda Kumar
Thank u, this works. On 7/30/08, Jim Lyons <[EMAIL PROTECTED]> wrote: > > Try: > > mysql -uroot -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt 2> > 1.txt > > or > > mysql -uroot -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt 2> > 1.errs > > This will redirect STDERR.

Re: spool log to a file

2008-07-29 Thread Ananda Kumar
The problem with below statement is that, if i there is any error in sql statements it does not get written to 1.txt. So, even if there is any error, how can i get it written to 1.txt. mysql -uroot -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt On 7/29/08, Mary Bahrami <[EMAIL

RE: spool log to a file

2008-07-29 Thread Mary Bahrami
I use mysql -uroot -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt but it would be nice to see other solutions... -Original Message- From: Ananda Kumar [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2008 6:37 AM To: mysql Subject: spool log to a file Hi All, I am executing