title: Not able to establish connection to database using shell scripts when reading from properties file
body: <p>I am trying to read from properties file and trying to connect to oracle in shell script</p>
  
  <p>Properties file:</p>
  
  <pre><code>#  DB Credentials
  DbUser=CHRDPK68
  DbPwd=CHRDPK68
  DbSid=CHRDDPT9
  #No Of Days to keep partition for
  NO_OF_DAYS=1
  </code></pre>
  
  <p>Shell Script:</p>
  
  <pre><code>#!/bin/bash
  
  #reading from properties file
  . ./config/PurgeTool.properties
  
  if [ $# -ne 1 ]; then  
   echo "Please enter no days"
   exit 1
  fi
  
  echo "Days are: $1"  
  
  user=$DbUser
  pwd=$DbPwd
  sid=$DbSid
  
  echo $user
  echo $pwd
  echo $sid   
  
  sqlplus -s user/pwd@sid&lt;&lt;EOF
  SET HEAD OFF
  SET AUTOPRINT OFF
  SET TERMOUT ON
  SET SERVEROUTPUT ON
  
  @ ./sql/delete_partition.sql $1
  
  EOF
  </code></pre>
  
  <p>It is giving below issue but variables from properties file are echoed correctly</p>
  
  <p>CHRDPK68
  CHRDPK68
  CHRDPT9 </p>
  
  <pre><code>ERROR:
  ORA-01017: invalid username/password; logon denied
  
  
  SP2-0306: Invalid option.
  Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
  where &lt;logon&gt; ::= &lt;username&gt;[/&lt;password&gt;][@&lt;connect_identifier&gt;]
        &lt;proxy&gt; ::= &lt;proxyuser&gt;[&lt;username&gt;][/&lt;password&gt;][@&lt;connect_identifier&gt;]
  SP2-0306: Invalid option.
  Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
  where &lt;logon&gt; ::= &lt;username&gt;[/&lt;password&gt;][@&lt;connect_identifier&gt;]
        &lt;proxy&gt; ::= &lt;proxyuser&gt;[&lt;username&gt;][/&lt;password&gt;][@&lt;connect_identifier&gt;]
  SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
  Have executed the script
  </code></pre>
  
  <p>but when am replacing sql line with :</p>
  
  <pre><code>sqlplus -s CHRDPK68/CHRDPK68@CHRDPT9&lt;&lt;EOF
  </code></pre>
  
  <p>it is successfully executing .sql script
  I did try all permu and combo thinking that it might be to do with word being string but no luck included inside single , double quote but still error remains same</p>