title: Console scripts execution from Java program
body: <p>I am thinking about calling bash scripts from java program. I need to execute it once in a minute, but as many times as a number of clients from DB (around 1000). </p>
  
  <p>That's going to be something like <code>curl -o /dev/null -s -t "%{total_time}" | awk ...</code>. I believe that this is better to be implemented as bash script rather than in Java, because it will be not that lightweight but demand lots of things in java code to reproduce the behavior.</p>
  
  <p>I know about Runtime.exec(), but it creates a system process each time. I guess it would be OK to create 1-10 such processes, but 1000 system processes is not acceptable.</p>
  
  <p>What is the better way of doing that?</p>