title: Insert file content (with white line and special characters ) in bash variable for insert in oracle table with sqlplus
body: <p>I write this simpe test.ksh scipt:</p>
  <pre class="lang-sh prettyprint-override"><code>#!/bin/ksh
  
  TEST=$(cat $1 )
  sqlplus -S *****/*****@*****&lt;&lt;- EOF
  </code></pre>
  <pre class="lang-sql prettyprint-override"><code>set define off;
  SET SQLBLANKLINES ON;
  INSERT INTO DBADOC.TEST
  (
          &quot;TEST&quot;
  )
   VALUES
  (
        q'[ $TEST ]'
  )
  ;
  commit;
  EOF
  
  exit
  </code></pre>
  <hr />
  <p>Now if i run it with a simple file (3 lines without special char):</p>
  <pre><code>./test.ksh /home/oracle/scripts/test.txt
  1 row created.
  
  
  Commit complete.
  </code></pre>
  <p><strong>It runs perfectly.</strong></p>
  <p>If I choose a complex file (with blank lines and special character ), it doesn't work:</p>
  <pre><code>./test.ksh /home/oracle/scripts/check_free_space_dg.ksh
  SP2-0734: unknown command beginning &quot;# ========...&quot; - rest of line ignored.
  SP2-0734: unknown command beginning &quot;# @(#) NOM...&quot; - rest of line ignored.
  SP2-0734: unknown command beginning &quot;# @(#) GRU...&quot; - rest of line ignored.
  SP2-0734: unknown command beginning &quot;# @(#) DES...&quot; - rest of line ignored.
  SP2-0044: For a list of known commands enter HELP
  and to leave enter EXIT.
  [...]
  </code></pre>