title: How should i pass the password(containing special chars) as commandline argument?
body: <p>I have a deployment script to which i have to pass LDAP password as cmd paramater.</p>
  
  <p>actual password: <code> foo\$ser"ver\\ 1 </code> (contains three space characters: at the beginning, before <code>1</code>, and after <code>1</code>)</p>
  
  <p>e.g</p>
  
  <pre><code>...bin&gt;deployment.bat LDAPPassword= foo\$ser\"ver\\ 1 
  </code></pre>
  
  <p>Note:There are spaces in the password as shown at the beginning.</p>
  
  <p>The <code>deployment.bat</code> calls a class to which the above parameter is passed as an argument.
  The problem is that the class receives 2 distinct arguments:</p>
  
  <pre><code>args[0]= foo\$ser"ver\\            //The space after \\ is omitted
  args[1]=1                          //The space before and after 1 is omitted
  </code></pre>
  
  <p>How do I pass this password so that it is received as single string?</p>
  
  <p>I have already tried quoting the password as  </p>
  
  <pre><code>...bin&gt;deployment.bat LDAPPassword=" foo\$ser"ver\\ 1 "
  </code></pre>
  
  <p>however it won't work.</p>