title: How do I execute commands serially inside a shell script?
body: <p>I want to write a shell script to execute some commands <em><strong>in sequence</strong></em> (the next one starts only after the previous has finished and so on). I've never written a bash script before and I couldn't find the appropriate sequence.</p>
  <p>I know that in the terminal you do things like <code>yarn this &amp;&amp; yarn that &amp;&amp; yarn other</code> and it works but I don't know the equivalent inside a shell script.</p>
  <pre><code>#!/bin/sh
  
  direnv allow
  
  # now wait for direnv allow to finish
  
  direnv reload
  
  # now wait for direnv reload to finish
  
  yarn start:server
  </code></pre>