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