title: suppressing messages while running sql queries in a script
body: <p>I am trying to write a simple query-script that gets me cnt of rows in a table. However I am facing problem to suppress all sorts of oracle messages. All I am interested is the output:</p>
  
  <p>Here is my script:</p>
  
  <pre><code>#!/usr/bin/ksh
  sqlplus /nolog &lt;&lt;EOF
  connect user/pswd@databse
  set serveroutput on
  set heading off
  set feedback off
  select count(*) from table;
  exit;
  EOF
  </code></pre>
  
  <p>My output looks like this:</p>
  
  <pre><code>.desktop% sh sql.ksh 
  SQL*Plus: Release 10.2.0.2.0 - Production on Tue Dec 7 12:00:42 2010
  Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
  SQL&gt; Connected.
  SQL&gt; SQL&gt; SQL&gt; SQL&gt; 
          70
  SQL&gt; Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  With the Partitioning, OLAP, Data Mining and Real Application Testing options
  </code></pre>
  
  <p>All I want is the number 70 without any message so that I can write it to logs etc regularly. I know I can parse for the number but I ll have to change that every time my query or schema changes. Can't I just ask mysqlplus to suppress all those messages?</p>