title: How to mail result set from a SQL query thrugh a shell script
body: <p>I am fairly new to shell scripting and struggling to get results from a sql query in form of HTML table.</p>
  
  <p>I am using following code in a shell script to fetch data:</p>
  
  <pre><code>echo "Subject: Test HTML e-mail" &gt; html.txt
  echo "Content-Type: text/html" &gt;&gt; html.txt
  
  sqlplus -s -m "HTML ON TABLE 'BORDER="2"'" User/Pass &gt;&gt; html.txt
  SELECT * from EMP;
  EXIT;
  EOF
  </code></pre>
  
  <p>and then I am sending html.txt using sendmail
  I want to know how I can add more formatting options to this code. Right now its just sending the contents of EMP table in a predefined formatting.
  Do I need a CSS template for this? If yes, could anyone show it with a small example?</p>
  
  <p>Thanks</p>