MySQL Forums
Forum List  »  Newbie

Re: Ascii text boxes disappear when query output is redirected
Posted by: Barry Galbraith
Date: August 20, 2010 06:14PM

Log your console to a file with tee, then mail your log file

mysql> use test;
Database changed
mysql> tee d:\output.txt
Logging to file 'd:\output.txt'
mysql> select * from t1;
+---------------------+-------+
| entry_time          | sl_no |
+---------------------+-------+
| 2010-08-14 10:00:00 |     1 |
| 2010-08-14 10:00:00 |     2 |
| 2010-08-14 10:00:00 |     3 |
| 2010-08-14 10:00:00 |     4 |
| 2010-08-14 10:00:01 |     1 |
| 2010-08-14 10:00:01 |     2 |
| 2010-08-14 10:00:01 |     3 |
| 2010-08-14 10:00:01 |     4 |
+---------------------+-------+
8 rows in set (0.06 sec)

mysql> notee
Outfile disabled.
mysql>

the log file contains EXACTLY what you see on the screen.


mysql> select * from t1;
+---------------------+-------+
| entry_time          | sl_no |
+---------------------+-------+
| 2010-08-14 10:00:00 |     1 | 
| 2010-08-14 10:00:00 |     2 | 
| 2010-08-14 10:00:00 |     3 | 
| 2010-08-14 10:00:00 |     4 | 
| 2010-08-14 10:00:01 |     1 | 
| 2010-08-14 10:00:01 |     2 | 
| 2010-08-14 10:00:01 |     3 | 
| 2010-08-14 10:00:01 |     4 | 
+---------------------+-------+
8 rows in set (0.06 sec)

mysql> notee

Good luck,
Barry.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.