title: How do I kill all tasks run by a bash file in a screen window?
body: <p>Perhaps the answer is already out there, but after reading several Questions i didn't manage to do what I need. </p>
  
  <p><strong>My situation:</strong>
  I am using a machine through <code>ssh</code>. I created a <code>screen</code> window, I called a <code>bash</code> file like the following:</p>
  
  <pre><code>for var in 1..N
  do
  java -option $var
  done
  </code></pre>
  
  <p>with <code>N</code> very high.</p>
  
  <p><strong>Question:</strong> Is there a way to kill the all the java tasks launched by the<code>bash</code> file at once? Or to kill the screen window and everything is running in the screen? </p>
  
  <p><strong>Note</strong>: The <code>java</code> tasks are running -inside the <code>screen</code>- in the foreground. If I try to do <code>CTRL-C</code> I can kill only one <code>java</code> task at the time. </p>