title: Why use short-circuiting boolean logic rather than if/then/else in bash?
body: <p>So I'm now doing quite a bit more bash programming in the last week that I thought I'd do.</p>
  
  <p>I've seen code that uses <code>[ condition ] &amp;&amp; { ... }</code> and <code>if [ condition ]; then ...; fi</code> type constructs.</p>
  
  <p>As far as I understand <code>[ condition ] &amp;&amp; { ... }</code> is equivalent to <code>if [ condition ]; then ...; fi</code>.</p>
  
  <p>However with the former construct you can't do an else.  </p>
  
  <p>Can someone please explain why you'd use one over the other, the advantages/disadvantages and what would be best practice here.</p>