title: Run multiple scripts one after another in bash
body: <p>I'm trying to run three scripts one after the other.  One requires a user to input a file.  The scripts all run individually, and when I combine some with <strong>&amp;&amp;</strong> they work, but when I try to combine all three, it fails. They need each other to work, so it should go <em>script1.sh -> script2.sh -> script3.pl</em>.  </p>
  
  <ol>
  <li><em>script1.sh</em> needs 2 files inputted</li>
  <li><em>script2.sh</em> needs to output a <em>.csv</em></li>
  <li><em>script3.pl</em> runs on the <em>.csv</em> created and needs an input that I want to prompt the user for. </li>
  </ol>
  
  <p>Each takes a long time to run, so I'm also trying to have them run in the background with <code>nohup</code>. They run individually as follows:</p>
  
  <pre><code>script1.sh file1 file2
  
  script2.sh &gt; file.csv
  
  script3.pl --input answer    
  </code></pre>
  
  <p>I have tried using the following;</p>
  
  <pre><code>echo -n "Question?  "
  read answer
  nohup script1.sh $1 $2 &amp;&amp; script2.sh &gt; file.csv &amp;&amp; script3.pl --input $answer &amp;
  </code></pre>
  
  <p>It will work with the question, <em>script2.sh</em>, and <em>script3.pl</em>, but when I had <em>script1.sh</em> it wont work. <em>Script1.sh</em> and <em>script2.sh</em> combined will also work, but I am trying to combine all of three.</p>