title: How to format the output of unix shell script flat file which is generated from .sql file in the unix shell script
body: <p>I have a unix shell script which extracts the data from the database with a .sql file . In this SQL I need to format the file output with SET commands.  I need the output in such a way that the output display is with the column header without any spacing or lines in the header.</p>
  <p>Expected output:</p>
  <pre><code>Header1,header 2
  Mark,California
  Steve,India
  </code></pre>
  <p>The output I see:(extra line before header and dotted lines after header)</p>
  <pre><code>Header1, header 2
  -----------------
  Mark,California
  Steve, India
  </code></pre>
  <p>Shell script:</p>
  <pre><code>ABC.sh
  a=`sqlplus -silent $Database name @Ggg.sql`
  mv xyz.csv xyz_$1.csv
  dos2unix xyz_*.csv 2&gt;  /dev/null
   (cat body.txt; uuencode xyz_$1.csv xyz_$1.csv) | mailx -s &quot;subject&quot; 
   name@email.com
  (SQL file Gggg.sql is called and email is sent)
  
  Ggg.sql 
  `Set pagesize 5000`
  `Set linesize 700`
  `Set trimspool off`
  `Set heading on`
  `Set feedback off`
  `Set term off`
  `Set verify off``
  Spool jjj.csv;
  `Select * from table1 where column = '5'`;
  `SPOOL OFF`;
  EXIT`;
  </code></pre>