title: MySQL tee (\T) command doesn't output my queries or my comments
body: <p><strong>GOAL</strong>: to output all SQL queries and their outputs into a text file</p>
  
  <p><strong>SQL CODE</strong>:</p>
  
  <pre><code>\W /*enable warnings*/
  
  USE bookdb; /*doesn't exist because I WILL DROP DATABASE booksdb BEFORE RUNNING THIS SCRIPT (to avoid duplicate entry errors from testing out the queries during the assignment)*/
  
  /* Query 0 */
  
  SELECT user(), current_date(), version(), @@sql_mode\G
  
  /*Query 1*/
  
  CREATE DATABASE IF NOT EXISTS bookdb;
  Use bookdb;
  
  /*QUERY 2*/
  
  CREATE TABLE books (
   isbn CHAR(10),
   author VARCHAR(100) NOT NULL,
   title VARCHAR(128) NOT NULL,
   price DECIMAL(7 , 2 ) NOT NULL,
   subject VARCHAR(30) NOT NULL,
   PRIMARY KEY (isbn)
  )ENGINE = INNODB;
  
  /*QUERY 3*/
  
  INSERT INTO books
  VALUES ('0345377648', 'Anne Rice', 'Lasher', 14.00, 'FICTION');
  INSERT INTO books
  VALUES ('1557044287','Ridley Scott','Gladiator',26.36,'FICTION');
  INSERT INTO books
  VALUES ('0684856093', 'Sean Covey', 'The 7 Habits', 12, 'CHILDREN');
  
  /*QUERY 4*/
  
  SHOW TABLES;
  
  /*QUERY 5*/
  
  DESC books;
  
  /*QUERY 6*/
  
  SELECT * FROM books;
  
  /*QUERY 7*/
  
  SELECT ISBN, title, price FROM books;
  </code></pre>
  
  <p><strong>COMMANDS FROM SQL PROMPT</strong>:</p>
  
  <pre><code>mysql&gt; tee /my_scripts/yourname_assignment1.txt
  
  mysql&gt; source /my_scripts/yourname_assignment1.sql
  
  mysql&gt; notee
  </code></pre>
  
  <p><strong>RESULTING assignment1.txt FILE</strong>:</p>
  
  <pre><code>        user(): root@localhost
  current_date(): 2016-09-25
       version(): 5.7.15-0ubuntu0.16.04.1
      @@sql_mode:         ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_    FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
  1 row in set (0.00 sec)
  
  Query OK, 1 row affected (0.00 sec)
  
  Database changed
  Query OK, 0 rows affected (0.32 sec)
  
  Query OK, 1 row affected (0.06 sec)
  
  Query OK, 1 row affected (0.04 sec)
  
  Query OK, 1 row affected (0.08 sec)
  
  +------------------+
  | Tables_in_bookdb |
  +------------------+
  | books            |
  +------------------+
  1 row in set (0.00 sec)
  
  +---------+--------------+------+-----+---------+-------+
  | Field   | Type         | Null | Key | Default | Extra |
  +---------+--------------+------+-----+---------+-------+
  | isbn    | char(10)     | NO   | PRI | NULL    |       |
  | author  | varchar(100) | NO   |     | NULL    |       |
  | title   | varchar(128) | NO   |     | NULL    |       |
  | price   | decimal(7,2) | NO   |     | NULL    |       |
  | subject | varchar(30)  | NO   |     | NULL    |       |
  +---------+--------------+------+-----+---------+-------+
  5 rows in set (0.00 sec)
  
  +------------+--------------+--------------+-------+----------+
  | isbn       | author       | title        | price | subject  |
  +------------+--------------+--------------+-------+----------+
  | 0345377648 | Anne Rice    | Lasher       | 14.00 | FICTION  |
  | 0684856093 | Sean Covey   | The 7 Habits | 12.00 | CHILDREN |
  | 1557044287 | Ridley Scott | Gladiator    | 26.36 | FICTION  |
  +------------+--------------+--------------+-------+----------+
  3 rows in set (0.00 sec)
  
  +------------+--------------+-------+
  | ISBN       | title        | price |
  +------------+--------------+-------+
  | 0345377648 | Lasher       | 14.00 |
  | 0684856093 | The 7 Habits | 12.00 |
  | 1557044287 | Gladiator    | 26.36 |
  +------------+--------------+-------+
  3 rows in set (0.00 sec)
  
  mysql&gt; notee
  </code></pre>
  
  <p>As you can see, my queries are executed without errors (ie. they are coming out correctly), but the output is <i>not</i> listing the queries themselves.</p>
  
  <p>My professor's "example.txt" file includes the queries that are listed in the assignment1.sql file. In other words, his output apparently includes his queries in the SQL file where <i>my output</i> does not. How do you change the "tee" command to include the queries? Did my professor simply manually edit a copy of the file or am I missing something? </p>
  
  <p>I realize that if I <i>manually</i> enter the commands, my output will look more like his (ie. with the queries), but that's not the way he explained this assignment. </p>
  
  <p>I'm running the latest x64 Ubuntu OS if that might have an effect on the SQL. I'm new to this. I've thoroughly searched online for this specific issue, but no one has this one listed. </p>
  
  <p>Thank you.</p>
  
  <p><strong>ASSIGNMENT DIRECTIONS IF THIS CLARIFIES ANYTHING</strong>:</p>
  
  <ol>
  <li>Run the following command:
  mysql -u root –p --force --comments –vvv</li>
  <li>Use the tee command to put your output in a text file to submit.
  mysql> tee c:/my_scripts/yourname_assignment1.txt</li>
  <li>Run the SQL script hibrahim_assignment1.sql
  mysql> source c:\my_scripts\yourname_assignment1.sql</li>
  <li>Type in notee to stop the tee command.
  mysql> notee</li>
  </ol>