title: Command grouping (&&, ||, ...)
body: <p>We are currently in the /home/student/ directory. We execute the following commands:</p>
  
  <pre><code>pwd; (ls) || { cd .. &amp;&amp; ls student/; }  &amp;&amp; cd student || cd / &amp;&amp; cd ;
  </code></pre>
  
  <p>The commands that are executed are:
  pwd, ls, cd student, cd /, cd</p>
  
  <p>Here is what I think:</p>
  
  <ul>
  <li><p>pwd is executed, because it's the first command</p></li>
  <li><p>(ls) is executed in a subshell, because the commands are seperated<br>
  with ";"</p></li>
  <li>the code on the right of || isn't executed, since the code on the<br>
  left of || was executed</li>
  </ul>
  
  <p>So far everything clear, I guess. But I have no idea why other commands are executed? If someone could break it down for me, I'd appreciate it.</p>