title: How to spool or echo comments Oracle
body: <p>I'm new to oracle and trying to spool comments/line into file using a bash script.but only query output is getting spooled not the comment(Total No Of Students in Class).</p>
  
  <p>Below is the script which i am using:</p>
  
  <pre><code>sqlplus -s test/test&lt;&lt;EOF
  set echo on
  spool abc.txt
  
  --------------------------------------
  --Total No Of Students in Class.
  --------------------------------------
  select id ||','|| name from students ;
  EOF
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>--------------------------------------
  --Total No Of Students in Class.
  --------------------------------------
  1,joe
  2,Tom
  3,Jim
  </code></pre>