title: What is the right way to do command grouping in bash
body: <p>I would like to group few bash instructions after a condition:</p>
  
  <p>First attempt:</p>
  
  <pre><code>$ [[ 0 == 1 ]] &amp;&amp; echo 1; echo 2
  2
  </code></pre>
  
  <p>Second attempt:</p>
  
  <pre><code>$ [[ 0 == 1 ]] &amp;&amp; (echo 1; echo 2)
  $ [[ 0 == 0 ]] &amp;&amp; (echo 1; echo 2)
  1
  2
  </code></pre>
  
  <p>So the latter is what I want. </p>
  
  <p>Question: This is the 1st time I'm using <code>(</code>...<code>)</code> syntax in bash. Is <code>(</code>...<code>)</code> the right way to go, or does it have some side effects I might be missing?</p>