title: querying v$session table in unix
body: <p>I am trying the following in unix:</p>
  
  <pre><code>count=sqlplus -s ${DB_USER}/${DB_PASS}@${DB_INST} &lt;&lt; END
  set echo off head off verify off feed off pages 0 lin 120
  select COUNT(USERNAME) from v$session where status not in ('INACTIVE') and osuser not in ('oracle');
  exit;
  END
  echo $count
  </code></pre>
  
  <p>But it is evaluating <code>$session</code> as null and just querying table <code>"v"</code>. Any way to query this table in unix.</p>