title: Want to run a list of commands, but be able to edit the list while it's running
body: <p>I have a list of (bash) commands I want to run:</p>
  
  <pre><code>&lt;Command 1&gt;
  &lt;Command 2&gt;
  ...
  &lt;Command n&gt;
  </code></pre>
  
  <p>Each command takes a long time to run, and sometimes after seeing the output of (e.g.) <code>&lt;Command 1&gt;</code>, I'd like to update a parameter of <code>&lt;Command 5&gt;</code>, or add a new <code>&lt;Command k&gt;</code> at an arbitrary position in the list. But I want to be able to walk away from my machine at any time, and have it keep working through my last update to the list.</p>
  
  <p>This is similar to the question here: <a href="https://stackoverflow.com/questions/3398258/edit-shell-script-while-its-running">Edit shell script while it&#39;s running</a>. Some of those answers could be made to serve, but that question had the additional constraint of wanting to edit the script file itself, and I suspect there is a simpler answer because I don't have that exact constraint. </p>
  
  <p>My current solution is to end my script with a call to a second script. I can edit the second file while the first one runs, this lets me append new commands to the end of my list, but I can't make any changes to the list of commands in the first file. And once execution has started in the second file, I can't make any more changes. But I often stop my script to insert updates, and this sometimes means stopping a long command that is almost complete, only so that I can update later items on the list before I leave my machine for a time. I could of course chain together many files in this way, but that seems a mess for what (hopefully) has a simple solution.</p>