title: Using "false" in if statement KSH
body: <p>My code:</p>
  
  <pre><code>if $bVar1 &amp;&amp; $bVar2
  then
      echo "bVar1 &amp; bVar2 are true"
  elif $bVar3 &amp;&amp; !$bVar4
  then
      echo "bVar3 is true; bVar4 is false"
  fi
  </code></pre>
  
  <p>The <code>!$bVar4</code> part does not work as expected. I've tried:</p>
  
  <pre><code>elif $bVar3 &amp;&amp; !$bVar4
  elif $bVar3 &amp;&amp; !${bVar4}
  elif $bVar3 &amp;&amp; !$(bVar4)
  </code></pre>
  
  <p>but I cannot get this line to return <code>true</code> when <code>bVar3=true</code> and <code>bVar4=false</code>.</p>
  
  <p>For completeness, variables are assigned like this:</p>
  
  <pre><code>bVar3=true
  bVar4=false
  </code></pre>
  
  <p>(Of course, I can add a nested <code>if</code> statement within the <code>elif</code> like this:</p>
  
  <pre><code>if $bVar1 &amp;&amp; $bVar2
  then
      echo "bVar1 &amp; bVar2 are true"
  elif $bVar3
  then
      if $bVar4
      then
          : #pass
      else
          echo "bVar3 is true; bVar4 is false"
      fi
  fi
  </code></pre>
  
  <p>but that is unnecessary, isn't it? BTW - I did try this and this code works.)</p>