title: How do I pass an empty string with double quotes to a bash script?
body: <p>I'm trying to write a script that will accept as additional arguments on the command line an empty string with double quotes. I want the script to pass those arguments along with the double quoted empty string if that is provided, but instead the command interpreter seems to interpret such an argument as an empty string and strips away the quotes. Is there any way to do this? </p>
  
  <p>As a simple example I would have in the file script.sh:</p>
  
  <pre><code>#!/bin/bash
  /home/myapp $1 $2
  </code></pre>
  
  <p>If I run at the prompt:</p>
  
  <pre><code>$ ./script.sh arg1 ""
  </code></pre>
  
  <p>The script just executes <code>"/home/myapp arg1"</code>, but misses/ignores the second argument <code>("")</code>. I want it to preserve this empty string and instead execute: <code>/home/myapp arg1 ""</code></p>