title: execute PL SQL Procedure from Shell Script
body: <p>Hi I'm trying to execute PL SQL Procedure from my Shell Script and get the return value (out value), but it's not working. Can anyone advise what I'm doing wrong? Here's what I have:</p>
  
  <pre><code>output="$(sqlplus -S user/pw@//ip:1521/db &lt;&lt;ENDOFSQL
  set serveroutput on;
  DECLARE
      v_return PLS_INTEGER;
  BEGIN
      PKG.Procedure(v_return);
      DBMS_OUTPUT.PUT_LINE(v_return);
  END;
  exit;
  ENDOFSQL)"
  
  echo $output 
  </code></pre>