title: bash empty variable command substitution leads to a single quote
body: <p>The following is a script where the empty variable is replaced by single quotes. If the variable is not empty then we have the correct substitution.</p>
  
  <pre><code>$ set -x;  aa=""; bb=`curl "$aa" -vvv`; set +x
  + aa=
  ++ curl '' -vvv
  </code></pre>
  
  <p>The thing to notice is the single quotes in place of the empty variable.</p>
  
  <p>When variable is not empty, everything works fine as in:</p>
  
  <pre><code>$ set -x;  aa="google.com"; bb=`curl "$aa" -vvv`; set +x
  + aa=google.com
  ++ curl google.com -vvv
  </code></pre>
  
  <p>Q1: Why is an empty variable or a variable with space resulting in single quotes being introduced?
  Q2: How do I prevent the single quotes in lieu of the empty variable?</p>
  
  <p>Now, I can remove the double quotes and everything works fine but I need to preserve spaces if there are any. </p>
  
  <p>Thanks.</p>