title: Killing process in Shell Script
body: <p>I have a very simple problem: When I run a shell script I start a program which
  runs in an infinite loop. After a while I wanna stop then this program before I can
  it again with different parameters. The question is now how do I find out the pid of
  the program when I execute it? Basically, I wanna do something like that:</p>
  
  <pre><code>echo "Executing app1 with param1"  
  ./app1 param1 &amp;  
  echo "Executing app1"  
  ..do some other stuff  
  #kill somehow app1
  echo "Execution of app1 finished!"
  </code></pre>
  
  <p>Thanks!</p>